code: def test_sanitize_should_remove_all_fields_in_any_nested_body(self):
      fields_to_sanitize = [
          "kind",
          "properties.disks.kind",
          "properties.metadata.kind",
      ]
  
      body = {
          "kind": "compute#instanceTemplate",
          "name": "instance",
          "properties": {
              "disks": [
                  {
                      "name": "a",
                      "kind": "compute#attachedDisk",
                      "type": "PERSISTENT",
                      "mode": "READ_WRITE",
                  },
                  {
                      "name": "b",
                      "kind": "compute#attachedDisk",
                      "type": "PERSISTENT",
                      "mode": "READ_WRITE",
                  },
              ],
              "metadata": {
                  "kind": "compute#metadata",
                  "fingerprint": "GDPUYxlwHe4=",
              },
          },
      }
      sanitizer = GcpBodyFieldSanitizer(fields_to_sanitize)
      sanitizer.sanitize(body)
  
      assert {
          "name": "instance",
          "properties": {
              "disks": [
                  {
                      "name": "a",
                      "type": "PERSISTENT",
                      "mode": "READ_WRITE",
                  },
                  {
                      "name": "b",
                      "type": "PERSISTENT",
                      "mode": "READ_WRITE",
                  },
              ],
              "metadata": {"fingerprint": "GDPUYxlwHe4="},
          },
      } == body
  
file_path: airflow/tests/providers/google/cloud/utils/test_field_sanitizer.py
imports: from __future__ import annotations
  from copy import deepcopy
  import pytest
  from airflow.providers.google.cloud.utils.field_sanitizer import GcpBodyFieldSanitizer
label_desc: Use image node_id 9 for calling the TestGcpBodyFieldSanitizer obj's underlying member method code with example usage: obj.test_sanitize_should_remove_all_fields_in_any_nested_body() without return types