def age_to_create_time(age, from_time=None):
if not age:<EOL><INDENT>return None<EOL><DEDENT>if not from_time:<EOL><INDENT>from_time = dsub_util.replace_timezone(datetime.datetime.now(), tzlocal())<EOL><DEDENT>try:<EOL><INDENT>last_char = age[-<NUM_LIT:1>]<EOL>if last_char == '<STR_LIT:s>':<EOL><INDENT>return from_time - datetime.timedelta(seconds=int(age[:-<NUM_LIT:1>]))<EOL><DEDENT>elif last_char == '<STR_LIT:m>':<EOL><INDENT>return from_time - datetime.timedelta(minutes=int(age[:-<NUM_LIT:1>]))<EOL><DEDENT>elif last_char == '<STR_LIT:h>':<EOL><INDENT>return from_time - datetime.timedelta(hours=int(age[:-<NUM_LIT:1>]))<EOL><DEDENT>elif last_char == '<STR_LIT:d>':<EOL><INDENT>return from_time - datetime.timedelta(days=int(age[:-<NUM_LIT:1>]))<EOL><DEDENT>elif last_char == '<STR_LIT:w>':<EOL><INDENT>return from_time - datetime.timedelta(weeks=int(age[:-<NUM_LIT:1>]))<EOL><DEDENT>else:<EOL><INDENT>return dsub_util.replace_timezone(<EOL>datetime.datetime.utcfromtimestamp(int(age)), pytz.utc)<EOL><DEDENT><DEDENT>except (ValueError, OverflowError) as e:<EOL><INDENT>raise ValueError('<STR_LIT>' % (age, e))<EOL><DEDENT>
Compute the create time (UTC) for the list filter.

    If the age is an integer value it is treated as a UTC date.
    Otherwise the value must be of the form "<integer><unit>" where supported
    units are s, m, h, d, w (seconds, minutes, hours, days, weeks).

    Args:
      age: A "<integer><unit>" string or integer value.
      from_time:

    Returns:
      A timezone-aware datetime or None if age parameter is empty.