docs: def action_to_level(action):
      """Map action name to action level."""
      try:
          return ACTION_LEVEL_MAP[action]
      except LookupError:
          raise d1_common.types.exceptions.InvalidRequest(
              0, 'Unknown action. action="{}"'.format(action)
          )