<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def distance_to_nearest_place(feature, parent):
 """If the impact layer has a distance field, it will return the distance to the nearest place in metres. e.g. distance_to_nearest_place() -> 1234 """

    _ = feature, parent  # NOQA

    layer = exposure_summary_layer()
    if not layer:
        return None

    index = layer.fields().lookupField(
        distance_field['field_name'])
    if index < 0:
        return None

    feature = next(layer.getFeatures())
    return feature[index]