code: def term_frequency(
      s: pd.Series,
      max_features: Optional[int] = None,
      min_df=1,
      max_df=1.0,
  ) -> pd.DataFrame:
      """
      Represent a text-based Pandas Series using Term Frequency.
  
      Rows of the returned DataFrame represent documents whereas columns are
      terms. The value in the cell document-term is the frequency of the
      term in this document. The output is sparse.
      TODO add tutorial link
  
      The input Series should already be tokenized. If not, it will
      be tokenized before term_frequency is calculated.
  
      Parameters
      ----------
      s : Pandas Series (tokenized)
  
      max_features : int, optional, default=None
          Maximum number of features to keep. Will keep all features if set to
          None.
  
      min_df : float in range [0.0, 1.0] or int, optional, default=1
          When building the vocabulary ignore terms that have a document
          frequency (number of documents they appear in) strictly
          lower than the given threshold.
          If float, the parameter represents a proportion of documents,
          integer absolute counts.
  
      max_df : float in range [0.0, 1.0] or int, optional, default=1.0
          Ignore terms that have a document frequency (number of documents they
          appear in) frequency strictly higher than the given threshold.
          If float, the parameter represents a proportion of documents, integer
          absolute counts.
  
      Examples
      --------
      >>> import texthero as hero
      >>> import pandas as pd
      >>> s = pd.Series(["Text Text of doc one", "Text of of doc two", "Aha hi bnd one"]).pipe(hero.tokenize)
      >>> hero.term_frequency(s)  # doctest: +SKIP
      term_frequency
                  Aha Text   bnd  doc    hi   of   one  two
      0           0.00  0.4  0.00  0.2  0.00  0.2  0.20  0.0
      1           0.00  0.2  0.00  0.2  0.00  0.4  0.00  0.2
      2           0.25  0.0  0.25  0.0  0.25  0.0  0.25  0.0
  
      See Also
      --------
      TODO add tutorial link
      """
      # Term frequency is just the word counts for each document
      # with each document divided by the number of terms in the
      # document. That's just l1 normalization!
      s_term_frequency = s.pipe(
          count, max_features=max_features, min_df=min_df, max_df=max_df
      ).pipe(normalize, norm="l1")
  
      return s_term_frequency
  
imports: import pandas
  import numpy
  from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer
  from sklearn.manifold import TSNE
  from sklearn.decomposition import PCA, NMF
  from sklearn.cluster import KMeans, DBSCAN, MeanShift
  from sklearn.metrics.pairwise import cosine_similarity
  from sklearn.preprocessing import normalize
  from scipy.sparse import coo_matrix
  from typing import Optional, Union, Any
  from texthero._types import TextSeries, TokenSeries, VectorSeries, DataFrame, InputSeries
  from texthero import preprocessing
  import logging
  import warnings
label_desc: Use image node_id 2 for calling a global function with example usage: term_frequency(s, max_features, min_df, max_df) and returns: s_term_frequency