How to outline code blocks?

I know that code blocks are defined like this:
#let my-code1 = ```python
print(“1”)


and that outlines, e.g. for images, are defined like this:
#outline(
  title: none,
  target: figure.where(kind: image),
)

Now, how would I go about creating an outline of all code blocks?

/e: It looks like the code blocks are formatted wrong here. Defining it like this works in my project

Hello Dennis!

Similar to image figures you have to wrap your code blocks with a figure element, then you can create your list of figures with the raw figure kind.

#outline(
  title: "Listings",
  target: figure.where(kind: raw),
)

Here the code block:

#figure(
  ```python
  print("Hello World")
  ```,
  caption: "This is some python code"
)


On the forum you can use more than 3 backticks to format your code block correctly:

````
```python
print("1")
```
````