def remote_name(self) -> str:
        """
        :return:
            Name of the remote we are a reference of, such as ``origin`` for a reference
            named ``origin/master``.
        """
        tokens = self.path.split("/")
        # /refs/remotes/<remote name>/<branch_name>
        return tokens[2]

        :return:
            Name of the remote we are a reference of, such as ``origin`` for a reference
            named ``origin/master``.
        
git/refs/reference.py