code: def test_data_model(self):
      DataModel = dedupe.datamodel.DataModel
  
      self.assertRaises(TypeError, DataModel)
  
      data_model = DataModel(
          [
              {"field": "a", "variable name": "a", "type": "String"},
              {"field": "b", "variable name": "b", "type": "String"},
              {
                  "type": "Interaction",
                  "interaction variables": ["a", "b"],
              },
          ]
      )
  
      assert data_model._interaction_indices == [[0, 1]]
  
      data_model = DataModel(
          [
              {
                  "field": "a",
                  "variable name": "a",
                  "type": "String",
                  "has missing": True,
              },
              {"field": "b", "variable name": "b", "type": "String"},
              {
                  "type": "Interaction",
                  "interaction variables": ["a", "b"],
              },
          ]
      )
  
      assert data_model._missing_field_indices == [0, 2]
  
      data_model = DataModel(
          [
              {
                  "field": "a",
                  "variable name": "a",
                  "type": "String",
                  "has missing": False,
              },
              {"field": "b", "variable name": "b", "type": "String"},
              {
                  "type": "Interaction",
                  "interaction variables": ["a", "b"],
              },
          ]
      )
  
      assert data_model._missing_field_indices == []
  
file_path: dedupe/tests/test_dedupe.py
imports: import itertools
  import unittest
  import numpy
  import dedupe
label_desc: Use image node_id 1 for calling the DataModelTest obj's underlying member method code with example usage: obj.test_data_model() without return types