def convert_frequency(frequency):
number = int(re.findall('<STR_LIT>', frequency)[<NUM_LIT:0>])<EOL>unit = re.findall('<STR_LIT>', frequency)[<NUM_LIT:0>]<EOL>if unit == '<STR_LIT:h>':<EOL><INDENT>number *= <NUM_LIT> * <NUM_LIT><EOL><DEDENT>elif unit == '<STR_LIT:m>':<EOL><INDENT>number *= <NUM_LIT><EOL><DEDENT>elif unit == '<STR_LIT:d>':<EOL><INDENT>number *= <NUM_LIT> * <NUM_LIT> * <NUM_LIT><EOL><DEDENT>elif unit:<EOL><INDENT>raise FrequencyDefinitionError(unit)<EOL><DEDENT>return number<EOL>
return the number of seconds that a certain frequency string represents.
    For example: `1d` means 1 day which means 60 * 60 * 24 seconds.
    The recognized formats are:
        10d  : 10 days
        3m   : 3 minutes
        12h  : 12 hours