<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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)