<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _parse_time(time_str, property_name):
 """ Parse the time from the given string, convert to UTC, and return the datetime object Parameters time_str : str The time to parse property_name : str Name of the property where this time came from. Used in the exception raised if time is not parseable Returns ------- datetime.datetime Parsed datetime object Raises ------ samcli.commands.exceptions.UserException If the string cannot be parsed as a timestamp """

        if not time_str:
            return

        parsed = parse_date(time_str)
        if not parsed:
            raise UserException("Unable to parse the time provided by '{}'".format(property_name))

        return to_utc(parsed)