code: def test_cityblock_nans():
      primitive_instance = CityblockDistance()
      lats_longs_1 = [(i, i) for i in range(2)]
      lats_longs_2 = [(i, i) for i in range(2, 4)]
      lats_longs_1 += [
          (1, 1),
          (np.nan, 3),
          (4, np.nan),
          (np.nan, np.nan),
      ]
      lats_longs_2 += [
          (np.nan, np.nan),
          (np.nan, 5),
          (6, np.nan),
          (np.nan, np.nan),
      ]
      given_answer = pd.Series(
          list([276.37367594, 276.35262728] + [np.nan] * 4)
      )
      answer = primitive_instance(lats_longs_1, lats_longs_2)
      np.testing.assert_allclose(given_answer, answer, rtol=1e-09)
  
file_path: featuretools/featuretools/tests/primitive_tests/transform_primitive_tests/test_latlong_primitives.py
imports: import numpy
  import pandas
  import pytest
  from featuretools.primitives import CityblockDistance, GeoMidpoint, IsInGeoBox
label_desc: Use image node_id 2 for calling a global function with example usage: test_cityblock_nans() without return types