code: def is_try(task, source_env_prefix):
      
      # If get_repo() returns None, then _is_try_url() doesn't manage to process the URL
      repo = get_repo(task, source_env_prefix) or ''
      return any((
          task['schedulerId'] in ('gecko-level-1', ),
          'try' in _extract_from_env_in_payload(task, 'MH_BRANCH', default=''),
          _is_try_url(repo),
          _is_try_url(task['metadata'].get('source', '')),
      ))
docs: Determine if a task is a 'try' task (restricted privs).
  
      This goes further than get_repo.  We may or may not want
      to keep this.
  
      This checks for the following things::
  
          * ``task.payload.env.GECKO_HEAD_REPOSITORY`` == "https://hg.mozilla.org/try/"
          * ``task.payload.env.MH_BRANCH`` == "try"
          * ``task.metadata.source`` == "https://hg.mozilla.org/try/..."
          * ``task.schedulerId`` in ("gecko-level-1", )
  
      Args:
          task (dict): the task definition to check
          source_env_prefix (str): The environment variable prefix that is used
              to get repository information.
  
      Returns:
          bool: True if it's try