code: def _getaction(action):
      if not action:
          return "default"
      if action == "all":
          return "always"  # Alias
      for a in (
          "default",
          "always",
          "ignore",
          "module",
          "once",
          "error",
      ):
          if a.startswith(action):
              return a
      raise _OptionError("invalid action: %r" % (action,))
  
imports: import sys
label_desc: Use image node_id 13 for calling a global function with example usage: _getaction(action) and returns: str, str, a