code: def _split(value):
      
      if isinstance(value, str):
          # iterable, but not meant for splitting
          return value, value
      try:
          invalue, outvalue = value
      except TypeError:
          invalue = outvalue = value
      except ValueError:
          raise ValueError("Only single values and pairs are allowed")
      return invalue, outvalue
docs: Split input/output value into two values.