<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _IsMap(message, field):
 """Returns whether the "field" is actually a map-type."""

    value = message.get_assigned_value(field.name)
    if not isinstance(value, messages.Message):
        return False
    try:
        additional_properties = value.field_by_name('additionalProperties')
    except KeyError:
        return False
    else:
        return additional_properties.repeated