code: def read_text(
      filename: Union[PathLike, Iterator[str]],
      delimiter: Optional[str]=None,
      first_column_names: Optional[bool]=None,
      dtype: str='float32',
  ) -> AnnData:
      
      if not isinstance(filename, (PathLike, str, bytes)):
          return _read_text(filename, delimiter, first_column_names, dtype)
  
      filename = Path(filename)
      if filename.suffix == '.gz':
          with gzip.open(str(filename), mode='rt') as f:
              return _read_text(f, delimiter, first_column_names, dtype)
      elif filename.suffix == '.bz2':
          with bz2.open(str(filename), mode='rt') as f:
              return _read_text(f, delimiter, first_column_names, dtype)
      else:
          with filename.open() as f:
              return _read_text(f, delimiter, first_column_names, dtype)
docs: Read ``.txt``, ``.tab``, ``.data`` (text) file.
  
      Same as :func:`~anndata.read_csv` but with default delimiter ``None``.
  
      Parameters
      ----------
      filename
          Data file, filename or stream.
      delimiter
          Delimiter that separates data within text file. If ``None``, will split at
          arbitrary number of white spaces, which is different from enforcing
          splitting at single white space ``' '``.
      first_column_names
          Assume the first column stores row names.
      dtype
          Numpy data type.