code: def import_flatten_impl():
      global flatten_impl, unflatten_impl, imported_flatten_impl
      try:
          import apex_C
  
          flatten_impl = apex_C.flatten
          unflatten_impl = apex_C.unflatten
      except ImportError:
          print(
              "Warning:  apex was installed without --cpp_ext.  Falling back to Python flatten and unflatten."
          )
          flatten_impl = torch._utils._flatten_dense_tensors
          unflatten_impl = torch._utils._unflatten_dense_tensors
      imported_flatten_impl = True
  
imports: from collections import OrderedDict
  import copy
  import importlib
  from itertools import chain
  import torch
  import torch.distributed
  from torch.nn.modules import Module
  from torch.autograd import Variable
  from ..multi_tensor_apply import multi_tensor_applier
label_desc: Use image node_id 1 for calling a global function with example usage: import_flatten_impl() without return types