def METHOD_NAME(before, after, time):
    capacity_difference = before._energy - after._energy
    print("Battery drained by %f %s" % (capacity_difference,
                                        before._energy_units))
    if capacity_difference == 0:
        print("Battery capacity did not change, unable to determine remaining"
              " time", file=sys.stderr)
        return 1
    drain_per_second = capacity_difference / time
    print("Battery drained %f %s per second" % (drain_per_second,
                                                before._energy_units))
    # the battery at it's max design capacity (when it was brand new)
    design_life_minutes = round(
        ((before._energy_full_design / drain_per_second) / 60), 2)
    print("Battery Life with full battery at design capacity (when new): %.2f"
          "minutes" % (design_life_minutes))
    # the battery at it's current max capacity
    current_full_life_minutes = round(
        ((before._energy_full / drain_per_second) / 60), 2)
    print("Battery Life with a full battery at current capacity: %.2f minutes"
          % (current_full_life_minutes))
    # the battery at it's current capacity
    current_life_minutes = round(
        ((before._energy / drain_per_second) / 60), 2)
    print("Battery Life with at current battery capacity: %.2f minutes" %
          (current_life_minutes))
    return 0