def METHOD_NAME(potential_url: str) -> Optional[RepoUrl]:
    """
    Parses given URL of a git repository.
    ### Covered scenarios
    1. URL in form: `www.domain.com/foo/bar`
        - with trailing `.git`
        - without `www.`
        - starting with `http://`, `https://`, `git://` or `git+https://`
    2. URL in form: `git@domain.com:foo/bar`
        - with trailing `.git`
        - with `ssh://` at the start or with `git+ssh` instead of `git`
    8. Pagure format of forks, e.g.
       `domain.com/fork/username/namespace/project`
    9. Nested groups on GitLab or Pagure (empty namespace is supported as well)
    Args:
        potential_url: URL of a git repository.
    Returns:
        Object of RepoUrl class if can be parsed, `None` otherwise.
    """
    return RepoUrl.parse(potential_url)