code: def _make_fields(
      header,
      id_attr,
      label_attr,
      ignore_columns,
      lower,
      tokenize,
      include_lengths,
  ):
      r"""Create field metadata, i.e., attribute processing specification for each
      attribute.
  
      This includes fields for label and ID columns.
  
      Returns:
          list(tuple(str, MatchingField)): A list of tuples containing column name
              (e.g. "left_address") and corresponding :class:`~data.MatchingField` pairs,
              in the same order that the columns occur in the CSV file.
      """
  
      text_field = MatchingField(
          lower=lower,
          tokenize=tokenize,
          init_token="<<<",
          eos_token=">>>",
          batch_first=True,
          include_lengths=include_lengths,
      )
      numeric_field = MatchingField(
          sequential=False,
          preprocessing=lambda x: int(x),
          use_vocab=False,
      )
      id_field = MatchingField(
          sequential=False, use_vocab=False, id=True
      )
  
      fields = []
      for attr in header:
          if attr == id_attr:
              fields.append((attr, id_field))
          elif attr == label_attr:
              fields.append((attr, numeric_field))
          elif attr in ignore_columns:
              fields.append((attr, None))
          else:
              fields.append((attr, text_field))
      return fields
  
file_path: deepmatcher/deepmatcher/data/process.py
imports: import copy
  import io
  import logging
  import os
  from timeit import default_timer
  import six
  from torchtext.utils import unicode_csv_reader
  from .dataset import MatchingDataset
  from .field import MatchingField
label_desc: Use image node_id 2 for calling a global function with example usage: _make_fields(header, id_attr, label_attr, ignore_columns, lower, tokenize, include_lengths) and returns: fields