code: def ensure_tuple(tuple_or_mixed, *, cls=None):
      
      if cls is None:
          cls = tuple
  
      if isinstance(tuple_or_mixed, cls):
          return tuple_or_mixed
  
      if tuple_or_mixed is None:
          return tuple.__new__(cls, ())
  
      if isinstance(tuple_or_mixed, tuple):
          return tuple.__new__(cls, tuple_or_mixed)
  
      return tuple.__new__(cls, (tuple_or_mixed,))
docs: If it's not a tuple, let's make a tuple of one item.
      Otherwise, not changed.
  
      :param tuple_or_mixed:
      :return: tuple