code: def resolve_repository_name(repo_name: str) -> Tuple[str, str]:
      if "://" in repo_name:
          raise InvalidRepositoryError(
              f"Repository name cannot contain a scheme ({repo_name})"
          )
  
      index_name, remote_name = split_repo_name(repo_name)
      if index_name[0] == "-" or index_name[-1] == "-":
          raise InvalidRepositoryError(
              f"Invalid index name ({index_name}). Cannot begin or end with a hyphen."
          )
      return resolve_index_name(index_name), remote_name
  
imports: import base64
  import json
  import logging
  import os
  import platform
  from typing import Any, Dict, Mapping, Optional, Tuple, Union
  import dockerpycreds
label_desc: Use image node_id 5 for calling a global function with example usage: resolve_repository_name(repo_name) and returns: resolve_index_name,  remote_name