parameters: (usage, capacities)
return_statement: return price
docstring: Compute the best price for a given usage and possible capacities.
docstring_summary: Compute the best price for a given usage and possible capacities.
docstring_tokens: Compute the best price for a given usage and possible capacities .
function: def price_usage(usage, capacities):
      """Compute the best price for a given usage and possible capacities."""
      price = max(capacities)
      for capacity in capacities:
          if capacity < usage:
              continue
          price = min(capacity - usage, price)
      return price
function_tokens: def price_usage ( usage , capacities ) : price = max ( capacities ) for capacity in capacities : if capacity < usage : continue price = min ( capacity - usage , price ) return price