code: def to_inches(value, units):
      
      lookup = {'in': lambda x: x,
                'cm': lambda x: x/2.54,
                'mm': lambda x: x/(2.54*10)}
      try:
          return lookup[units](value)
      except KeyError:
          raise PlotnineError("Unknown units '{}'".format(units))
docs: Convert value to inches
  
      Parameters
      ----------
      value : float
          Value to be converted
      units : str
          Units of value. Must be one of
          `['in', 'cm', 'mm']`.