code: def _is_graph_linearized(gm: GraphModule):
      code = gm.code
      # find patterns like r'      return output_1, output_2', which is not expected on a linearized graph
      pattern = re.compile(
          r"     return [a-zA-Z0-9_]+(, [a-zA-Z0-9_]+)+"
      )
      if pattern.findall(code):
          return False
      else:
          return True
  
imports: import copy
  import re
  from typing import Callable
  import pytest
  import torch
  import torchvision.models
  from torch.fx import GraphModule
  import colossalai
  from colossalai.fx import ColoTracer
  from colossalai.fx._compatibility import is_compatible_with_meta
  from colossalai.fx.graph_module import ColoGraphModule
  from colossalai.fx.passes.meta_info_prop import MetaInfoProp
  from colossalai.legacy.core import global_context
  from colossalai.testing import rerun_if_address_is_in_use, spawn
label_desc: Use image node_id 3 for calling a global function with example usage: _is_graph_linearized(gm) and returns: False, True