def _format_label(duration, start_time, end_time, method):
    """
    Formats a time block label.
    :param duration: Duration.
    :param start_time: Start time.
    :param end_time: End time.
    :param method: Feeding method.
    :return: Formatted string with duration, start, and end time.
    """
    readable_method = FEEDING_METHOD_LOOKUP.get(method)
    return "{} feeding {} ({} to {})".format(
        readable_method,
        duration_string(duration),
        formats.time_format(start_time, "TIME_FORMAT"),
        formats.time_format(end_time, "TIME_FORMAT"),
    )

    Formats a time block label.
    :param duration: Duration.
    :param start_time: Start time.
    :param end_time: End time.
    :param method: Feeding method.
    :return: Formatted string with duration, start, and end time.
    
reports/graphs/feeding_pattern.py