How do I transform this into a function `def()`

```
detected_faces1 = face_client.face.detect_with_url(IMAGE_BASE_URL + source_image_file_name1, detection_model='detection_03')
    source_image1_id = detected_faces1[0].face_id
    print('{} face(s) detected from image {}.'.format(len(detected_faces1), source_image_file_name1))

```

I tried doing this:

```
def detected_faces1():
    face_client.face.detect_with_url(IMAGE_BASE_URL, detection_model='detection_03')
    source_image1_id = detected_faces1[0].face_id
print('{} face(s) detected from image.'.format(len(detected_faces1)))

```

But I get an error:

```
TypeError: 'function' object is not subscriptable

```