code: def __init__(self, definition: VariableDefinition):
      super(CustomType, self).__init__(definition)
  
      try:
          self.comparator = definition["comparator"]  # type: ignore[assignment]
      except KeyError:
          raise KeyError(
              "For 'Custom' field types you must define "
              "a 'comparator' function in the field "
              "definition. "
          )
  
      if "variable name" not in definition:
          self.name = "(%s: %s, %s)" % (
              self.field,
              self.type,
              self.comparator.__name__,
          )
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING
  from dedupe import predicates
label_desc: Use image node_id 1 to create a new CustomType object from inherited base classes: FieldType with example: obj = CustomType(definition)