def parse_usage(machine, usage, date, machine_name, log_type):
    """
    Parses usage
    """
    assert machine.name == machine_name

    year, month, day = date.split('-')
    date = datetime.date(int(year), int(month), int(day))

    return parse_logs(usage, date, machine_name, log_type)