code: def as_labeller(x, default=label_value, multi_line=True):
      
      if x is None:
          x = default
  
      # One of the labelling functions as string
      with suppress(KeyError, TypeError):
          x = LABELLERS[x]
  
      # x is a labeller
      with suppress(AttributeError):
          if x.__name__ == '_labeller':
              return x
  
      def _labeller(label_info):
          label_info = pd.Series(label_info).astype(str)
  
          if callable(x) and x.__name__ in LABELLERS:
              # labellers in this module
              return x(label_info)
          elif hasattr(x, '__contains__'):
              # dictionary lookup
              for var in label_info.index:
                  if label_info[var] in x:
                      label_info[var] = x[label_info[var]]
              return label_info
          elif callable(x):
              # generic function
              for var in label_info.index:
                  label_info[var] = x(label_info[var])
              return label_info
          else:
              msg = "Could not use '{0}' for labelling."
              raise PlotnineError(msg.format(x))
  
      return _labeller
docs: Coerse to labeller function
  
      Parameters
      ----------
      x : function | dict
          Object to coerce
      default : function | str
          Default labeller. If it is a string,
          it should be the name of one the labelling
          functions provided by plotnine.
      multi_line : bool
          Whether to place each variable on a separate line
  
      Returns
      -------
      out : function
          Labelling function