(xs)
Returns a single element if possible, or the original list/tuple if not.
Returns a single element if possible, or the original list/tuple if not.
Returns a single element if possible or the original list / tuple if not .
def _make_singleitem_or_original(xs):
  """Returns a single element if possible, or the original list/tuple if not."""
  if isinstance(xs, (list, tuple)) and len(xs) == 1:
    return xs[0]
  else:
    return xs
def _make_singleitem_or_original ( xs ) : if isinstance ( xs , ( list , tuple ) ) and len ( xs ) == 1 : return xs [ 0 ] else : return xs