code: def check_for_mutable_operation(
      target: Callable,
      args: Tuple["Argument", ...],
      kwargs: Dict[str, "Argument"],
  ):
      signatures, schemas = get_signature_for_torch_op(
          target, return_schemas=True
      )
  
      if signatures and schemas:
          matched_schemas = []
  
          # Iterate through all of the schema until we find one that matches
          # If one matches, populate `new_args_and_kwargs` with the new args/kwargs
          # values. If none matches, `new_args_and_kwargs` will be None
          for candidate_signature, schema in zip(signatures, schemas):
              try:
                  candidate_signature.bind(*args, **kwargs)
                  matched_schemas.append((candidate_signature, schema))
              except TypeError as e:
                  continue
  
          def throw_if_mutable(schema):
              if schema.is_mutable:
                  raise RuntimeError(
                      f"Tried to trace mutable operation {schema}. FX only supports functional "
                      f"code, so operations that mutate operands in-place (e.g. via `out` arguments) "
                      f"are not supported"
                  )
  
          if len(matched_schemas) == 0:
              # Did not match any schema. Cannot check for mutation
              pass
          elif len(matched_schemas) == 1:
              # Matched exactly one schema, unambiguous
              _, schema_to_check = matched_schemas[0]
              throw_if_mutable(schema_to_check)
              pass
          else:
              # Ambiguous schema match. Since mutability checking is best effort,
              # do nothing.
              pass
  
imports: import torch
  import inspect
  import numbers
  import types
  import typing
  import enum
  import warnings
  from typing import Any, Callable, Dict, List, Optional, Tuple, NamedTuple, cast, TYPE_CHECKING
  from torch._jit_internal import boolean_dispatched
  from ._compatibility import compatibility
  from torch._ops import OpOverloadPacket, OpOverload
label_desc: Use image node_id 5 for calling a global function with example usage: check_for_mutable_operation(target, args, kwargs) without return types