code: def _set_read_only_resource_inputs_attr(
      op: ops.Operation, func_graph: func_graph_module.FuncGraph
  ):
      """Sets the list of resource inputs which are read-only.
  
      This is used by AutomaticControlDependencies.
  
      Args:
        op: PartitionedCall Operation.
        func_graph: FuncGraph.
      """
      read_only_indices = (
          acd.get_read_only_resource_input_indices_graph(func_graph)
      )
      ops.set_int_list_attr(
          op, acd.READ_ONLY_RESOURCE_INPUTS_ATTR, read_only_indices
      )
  
imports: import dataclasses
  import traceback
  import typing
  from typing import Any, Dict, List, Optional, Sequence, Union
  from tensorflow.core.framework import attr_value_pb2
  from tensorflow.core.framework import function_pb2
  from tensorflow.core.framework import graph_debug_info_pb2
  from tensorflow.core.function.polymorphism import function_type
  from tensorflow.python.client import pywrap_tf_session
  from tensorflow.python.eager import context
  from tensorflow.python.eager import record
  from tensorflow.python.eager.polymorphic_function import attributes
  from tensorflow.python.eager.polymorphic_function import function_type_utils
  from tensorflow.python.framework import auto_control_deps_utils
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import error_interpolation
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import func_graph
  from tensorflow.python.framework import function_def_to_graph
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import handle_data_util
  from tensorflow.python.types import core
  from tensorflow.python.util import compat
  from tensorflow.python.util import function_utils
  from tensorflow.python.util import tf_stack
label_desc: Use image node_id 1 for calling a global function with example usage: _set_read_only_resource_inputs_attr(op, func_graph) without return types