<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ls_remote(self, remote='origin', refs=None):
 """Return a mapping of refs to commit ids for the given remote. 'remote' can be a remote ref in a local repo, e.g. origin, or url of a remote repository. Returns:: {<ref1>: <commit_hash1>, <ref2>: <commit_hash2>, <refN>: <commit_hashN>, } If 'refs' is supplied, only matching refs are returned. """

        return git_ls_remote(
            self.repo_dir, remote=remote, refs=refs)