<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getRemote(self, name: str = None, ha: HA = None):
 """ Find the remote by name or ha. :param name: the name of the remote to find :param ha: host address pair the remote to find :raises: RemoteNotFound """

        return self.findInRemotesByName(name) if name else \
            self.findInRemotesByHA(ha)