code: def main():
      """Entrypoint for mne <command> usage."""
      mne_bin_dir = op.dirname(op.dirname(__file__))
      valid_commands = sorted(
          glob.glob(op.join(mne_bin_dir, "commands", "mne_*.py"))
      )
      valid_commands = [
          c.split(op.sep)[-1][4:-3] for c in valid_commands
      ]
  
      def print_help():  # noqa
          print("Usage : mne command options\n")
          print("Accepted commands :\n")
          for c in valid_commands:
              print("\t- %s" % c)
          print(
              "\nExample : mne browse_raw --raw sample_audvis_raw.fif"
          )
          print("\nGetting help example : mne compute_proj_eog -h")
  
      if (
          len(sys.argv) == 1
          or "help" in sys.argv[1]
          or "-h" in sys.argv[1]
      ):
          print_help()
      elif sys.argv[1] == "--version":
          print("MNE %s" % mne.__version__)
      elif sys.argv[1] not in valid_commands:
          print('Invalid command: "%s"\n' % sys.argv[1])
          print_help()
      else:
          cmd = sys.argv[1]
          cmd = importlib.import_module(f".mne_{cmd}", "mne.commands")
          sys.argv = sys.argv[1:]
          cmd.run()
  
file_path: mne-python/mne/commands/utils.py
imports: import glob
  import importlib
  import os
  import os.path
  import sys
  from optparse import OptionParser
  import mne
label_desc: Use image node_id 4 for calling a global function with example usage: main() without return types