code: def categorical(
      self, field_model: Mapping[str, FieldVariable]
  ) -> None:
      categoricals = [
          field
          for field in self.interaction_fields
          if hasattr(field_model[field], "higher_vars")
      ]
      noncategoricals = [
          field
          for field in self.interaction_fields
          if not hasattr(field_model[field], "higher_vars")
      ]
  
      dummies = [
          field_model[field].higher_vars for field in categoricals
      ]
  
      self.higher_vars = []
      for combo in itertools.product(*dummies):
          var_names = [field.name for field in combo] + noncategoricals
          higher_var = InteractionType(
              {
                  "has missing": self.has_missing,
                  "interaction variables": var_names,
              }
          )
          self.higher_vars.append(higher_var)
  
file_path: dedupe/dedupe/variables/interaction.py
imports: from __future__ import annotations
  import itertools
  from typing import Mapping
  from dedupe._typing import VariableDefinition
  from dedupe.variables.base import FieldType
  from dedupe.variables.base import Variable
label_desc: Use image node_id 3 for calling the InteractionType obj's underlying member method code with example usage: obj.categorical(field_model) without return types