code: def _flatten_update_paths(updates):
      new_updates = {}
      for key, value in updates.items():
          if isinstance(value, dict):
              for sub_key, sub_value in _flatten_update_paths(
                  value
              ).items():
                  new_updates[f"{key}.{sub_key}"] = sub_value
          else:
              new_updates[key] = value
  
      return new_updates
  
imports: from __future__ import annotations
  import typing
  from typing import Any, Literal
  import google.ai.generativelanguage
  from google.generativeai import operations
  from google.generativeai.client import get_default_model_client
  from google.generativeai.types import model_types
  from google.api_core import operation
  from google.api_core import protobuf_helpers
  from google.protobuf import field_mask_pb2
label_desc: Use image node_id 11 for calling a global function with example usage: _flatten_update_paths(updates) and returns: new_updates