code: def _run(  # type: ignore
      self,
      X,
      max_gram_length=None,
      max_skip_count=None,
      min_gram_length=None,
      mode=None,
      ngram_counts=None,
      ngram_indexes=None,
      pool_int64s=None,
      pool_strings=None,
      weights=None,
  ):
      # weights should be identical to self.weights as well as
      # pool_strings, pool_int64s, ngram_indexes, ngram_counts, mode.
      # This means none of those attributes can be used in one function.
  
      total_items = np.prod(X.shape)
  
      num_rows = 0
      B = 0
      C = 0
      input_dims = X.shape
      if len(input_dims) == 0:
          num_rows = 1
          C = 1
          if total_items != 1:
              raise ValueError(
                  f"Unexpected total of items {total_items}."
              )
      elif len(input_dims) == 1:
          num_rows = 1
          C = input_dims[0]
      elif len(input_dims) == 2:
          B = input_dims[0]
          C = input_dims[1]
          num_rows = B
          if B < 1:
              raise ValueError(
                  f"Input shape must have either [C] or [B,C] dimensions with B > 0, B={B}, C={C}."
              )
      else:
          raise ValueError(
              f"Input shape must have either [C] or [B,C] dimensions with B > 0, B={B}, C={C}."
          )
  
      if num_rows * C != total_items:
          raise ValueError(
              f"Unexpected total of items, num_rows * C = {num_rows * C} != total_items = {total_items}."
          )
      # Frequency holder allocate [B..output_size_] and init all to zero
      frequencies = np.zeros(
          (num_rows * self.output_size_,), dtype=np.int64
      )
  
      if total_items == 0 or self.int64_map_.empty():
          # TfidfVectorizer may receive an empty input when it follows a Tokenizer
          # (for example for a string containing only stopwords).
          # TfidfVectorizer returns a zero tensor of shape
          # {b_dim, output_size} when b_dim is the number of received observations
          # and output_size the is the maximum value in ngram_indexes attribute plus 1.
          return (self.output_result(B, frequencies),)  # type: ignore[arg-type]
  
      def fn(row_num):
          self.compute_impl(
              X,
              row_num,
              C,
              frequencies,  # type: ignore[arg-type]
              max_gram_length=max_gram_length,
              max_skip_count=max_skip_count,
              min_gram_length=min_gram_length,
              mode=mode,
              ngram_counts=ngram_counts,
              ngram_indexes=ngram_indexes,
              pool_int64s=pool_int64s,
              pool_strings=pool_strings,
              weights=weights,
          )
  
      # can be parallelized.
      for i in range(num_rows):
          fn(i)
  
      return (self.output_result(B, frequencies),)
  
imports: from enum import IntEnum
  from typing import List
  import numpy
  from onnx.reference.op_run import OpRun
label_desc: Use image node_id 5 for calling the TfIdfVectorizer obj's underlying member method code with example usage: obj._run(X, max_gram_length, max_skip_count, min_gram_length, mode, ngram_counts, ngram_indexes, pool_int64s, pool_strings, weights) and returns: self, self