code: def test_resources_subtraction():
      resource_1 = _Resources(
          1,
          0,
          0,
          1,
          custom_resources={"a": 1, "b": 2},
          extra_custom_resources={"a": 1, "b": 1},
      )
      resource_2 = _Resources(
          1,
          0,
          0,
          1,
          custom_resources={"a": 1, "b": 2},
          extra_custom_resources={"a": 1, "b": 1},
      )
      new_res = _Resources.subtract(resource_1, resource_2)
      assert new_res.cpu == 0
      assert new_res.gpu == 0
      assert new_res.extra_cpu == 0
      assert new_res.extra_gpu == 0
  
      assert all(k == 0 for k in new_res.custom_resources.values())
      assert all(
          k == 0 for k in new_res.extra_custom_resources.values()
      )
  
file_path: ray/python/ray/tune/tests/test_resource_updater.py
imports: import ray
  from ray.tests.conftest import *
  from ray.tune.utils.resource_updater import _ResourceUpdater, _Resources
  from unittest import mock
label_desc: Use image node_id 2 for calling a global function with example usage: test_resources_subtraction() without return types