code: def participant_from_submission_path(submission_path):
      """Parses type of participant based on submission filename.
  
      Args:
        submission_path: path to the submission in Google Cloud Storage
  
      Returns:
        dict with one element. Element key correspond to type of participant
        (team, baseline), element value is ID of the participant.
  
      Raises:
        ValueError: is participant can't be determined based on submission path.
      """
      basename = os.path.basename(submission_path)
      file_ext = None
      for e in ALLOWED_EXTENSIONS:
          if basename.endswith(e):
              file_ext = e
              break
      if not file_ext:
          raise ValueError(
              "Invalid submission path: " + submission_path
          )
      basename = basename[: -len(file_ext)]
      if basename.isdigit():
          return {"team_id": int(basename)}
      if basename.startswith("baseline_"):
          return {"baseline_id": basename[len("baseline_") :]}
      raise ValueError("Invalid submission path: " + submission_path)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from collections import namedtuple
  from io import StringIO
  import os
  from six import iteritems
label_desc: Use image node_id 1 for calling a global function with example usage: participant_from_submission_path(submission_path) and returns: dict, dict