code: def sequential(*args):
      """Advanced nn.Sequential.
      Args:
          nn.Sequential, nn.Layer
      Returns:
          nn.Sequential
      """
      if len(args) == 1:
          if isinstance(args[0], OrderedDict):
              raise NotImplementedError(
                  "sequential does not support OrderedDict input."
              )
          return args[0]  # No sequential is needed.
      modules = []
      for module in args:
          if isinstance(module, nn.Sequential):
              for submodule in module.children():
                  modules.append(submodule)
          elif isinstance(module, nn.Layer):
              modules.append(module)
      return nn.Sequential(*modules)
  
imports: from collections import OrderedDict
  import numpy
  import paddle.nn
label_desc: Use image node_id 1 for calling a global function with example usage: sequential() and returns: nn, args