code: def test_foreground_position(
      self, arguments, input_data, _expected_data, _align_corners
  ):
      result = CropForegroundd(**arguments)(input_data)
      np.testing.assert_allclose(
          result["foreground_start_coord"], np.array([1, 1])
      )
      np.testing.assert_allclose(
          result["foreground_end_coord"], np.array([4, 4])
      )
  
      arguments["start_coord_key"] = "test_start_coord"
      arguments["end_coord_key"] = "test_end_coord"
      result = CropForegroundd(**arguments)(input_data)
      np.testing.assert_allclose(
          result["test_start_coord"], np.array([1, 1])
      )
      np.testing.assert_allclose(
          result["test_end_coord"], np.array([4, 4])
      )
  
file_path: MONAI/tests/test_crop_foregroundd.py
imports: from __future__ import annotations
  import unittest
  import numpy
  from parameterized import parameterized
  from monai.data.meta_tensor import MetaTensor
  from monai.transforms import CropForegroundd
  from monai.transforms.lazy.functional import apply_pending
  from tests.utils import TEST_NDARRAYS_ALL, assert_allclose
label_desc: Use image node_id 2 for calling the TestCropForegroundd obj's underlying member method code with example usage: obj.test_foreground_position(arguments, input_data, _expected_data, _align_corners) without return types