code: def _tfidf(term, corpus, document_index):
      idf = (
          math.log(
              (1 + len(corpus))
              / (1 + len([doc for doc in corpus if term in doc]))
          )
          + 1
      )
      tfidf_value = idf * corpus[document_index].count(term)
      return tfidf_value
  
imports: import pandas
  import numpy
  from texthero import representation
  from texthero import preprocessing
  import pytest
  from .conftest import broken_case
  import doctest
  import unittest
  import string
  import math
  import warnings
  from parameterized import parameterized
label_desc: Use image node_id 2 for calling a global function with example usage: _tfidf(term, corpus, document_index) and returns: tfidf_value