code: def str_cast(maybe_bytes, encoding='utf-8'):
      
      if isinstance(maybe_bytes, bytes_):
          return maybe_bytes.decode(encoding)
      else:
          return maybe_bytes
docs: Converts any bytes-like input to a string-like output, with respect to
      python version
  
      Parameters
      ----------
      maybe_bytes : if this is a bytes-like object, it will be converted to a string
      encoding  : str, default='utf-8'
          encoding to be used when decoding bytes