code: def run(ctx, module, interface, list, help):
      """Run a Nipype Interface.
  
      Examples:\n
      nipypecli run nipype.interfaces.nipy --list\n
      nipypecli run nipype.interfaces.nipy ComputeMask --help
      """
      import argparse
      from .utils import add_args_options
      from ..utils.nipype_cmd import run_instance
  
      # print run command help if no arguments are given
      module_given = bool(module)
      if not module_given:
          click.echo(ctx.command.get_help(ctx))
  
      # print the list of available interfaces for the given module
      elif (module_given and list) or (module_given and not interface):
          iface_names = list_interfaces(module)
          click.echo("Available Interfaces:")
          for if_name in iface_names:
              click.echo(f"    {if_name}")
  
      # check the interface
      elif module_given and interface:
          # create the argument parser
          description = f"Run {interface}"
          prog = " ".join(
              [ctx.command_path, module.__name__, interface] + ctx.args
          )
          iface_parser = argparse.ArgumentParser(
              description=description, prog=prog
          )
  
          # instantiate the interface
          node = getattr(module, interface)()
          iface_parser = add_args_options(iface_parser, node)
  
          if not ctx.args:
              # print the interface help
              try:
                  iface_parser.print_help()
              except:
                  print(
                      "An error occurred when trying to print the full"
                      "command help, printing usage."
                  )
              finally:
                  iface_parser.print_usage()
          else:
              # run the interface
              args = iface_parser.parse_args(args=ctx.args)
              run_instance(node, args)
  
file_path: nipype/nipype/scripts/cli.py
imports: import click
  from .instance import list_interfaces
  from .utils import CONTEXT_SETTINGS, UNKNOWN_OPTIONS, ExistingDirPath, ExistingFilePath, UnexistingFilePath, RegularExpression, PythonModule, check_not_none
  from ..None import __version__
label_desc: Use image node_id 5 for calling a global function with example usage: run(ctx, module, interface, list, help) without return types