code: def _read_legacy_10x_mtx(path, var_names='gene_symbols', make_unique=True, cache=False):
      
      path = Path(path)
      adata = read(path / 'matrix.mtx', cache=cache).T  # transpose the data
      genes = pd.read_csv(path / 'genes.tsv', header=None, sep='\t')
      if var_names == 'gene_symbols':
          var_names = genes[1]
          if make_unique:
              var_names = anndata.utils.make_index_unique(pd.Index(var_names))
          adata.var_names = var_names
          adata.var['gene_ids'] = genes[0].values
      elif var_names == 'gene_ids':
          adata.var_names = genes[0]
          adata.var['gene_symbols'] = genes[1].values
      else:
          raise ValueError('`var_names` needs to be \'gene_symbols\' or \'gene_ids\'')
      adata.obs_names = pd.read_csv(path / 'barcodes.tsv', header=None)[0]
      return adata
docs: Read mex from output from Cell Ranger v2 or earlier versions