code: def test_get_function_called_once():
      class TestPrimitive(TransformPrimitive):
          def __init__(self):
              self.get_function_call_count = 0
  
          def get_function(self):
              self.get_function_call_count += 1
  
              def test(x):
                  return x
  
              return test
  
      primitive = TestPrimitive()
  
      for _ in range(2):
          primitive(range(6))
  
      assert primitive.get_function_call_count == 1
  
file_path: featuretools/featuretools/tests/primitive_tests/test_primitive_base.py
imports: from datetime import datetime
  import numpy
  import pandas
  from pytest import raises
  from featuretools.primitives import Haversine, IsIn, IsNull, Max, TimeSinceLast
  from featuretools.primitives.base import TransformPrimitive
label_desc: Use image node_id 5 for calling a global function with example usage: test_get_function_called_once() and returns: test, x