<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_user_contact(user, contact_types=['Contact', 'LabContact']):
 """Returns the associated contact of a Plone user If the user passed in has no contact associated, return None. The `contact_types` parameter filter the portal types for the search. :param: Plone user :contact_types: List with the contact portal types to search :returns: Contact associated to the Plone user or None """

    if not user:
        return None

    query = {'portal_type': contact_types, 'getUsername': user.id}
    brains = search(query, catalog='portal_catalog')
    if not brains:
        return None

    if len(brains) > 1:
        # Oops, the user has multiple contacts assigned, return None
        contacts = map(lambda c: c.Title, brains)
        err_msg = "User '{}' is bound to multiple Contacts '{}'"
        err_msg = err_msg.format(user.id, ','.join(contacts))
        logger.error(err_msg)
        return None

    return get_object(brains[0])