code: def find_chunk_compute_input_and_output_nodes(
      nodes: List[Node],
  ) -> Union[List, List]:
      """
      Find non-compute input and output node names.
      input nodes are nodes used in the list
      output nodes are nodes will use nodes in the list
      """
      input_nodes = []
      output_nodes = []
  
      # if a node has an input node which is not in the node list
      # we treat that input node as the input of the checkpoint function
      for node in nodes:
          for input_node in node._input_nodes.keys():
              if (
                  input_node not in nodes
                  and input_node not in input_nodes
                  and not is_non_compute_node_except_placeholder(
                      input_node
                  )
              ):
                  input_nodes.append(input_node)
  
      # if a node has a user node which is not in the node list
      # we treat that user node as the node receiving the current node output
      for node in nodes:
          for output_node in node.users.keys():
              if (
                  output_node not in nodes
                  and node not in output_nodes
                  and not is_non_compute_node_except_placeholder_output(
                      output_node
                  )
              ):
                  output_nodes.append(node)
  
      return input_nodes, output_nodes
  
imports: from typing import Any, Dict, List, Union
  from torch.fx.node import Node
  from colossalai.logging import get_dist_logger
label_desc: Use image node_id 11 for calling a global function with example usage: find_chunk_compute_input_and_output_nodes(nodes) and returns: input_nodes,  output_nodes