def lock(self, remote=None):
        locked = []
        errors = []
        for repo in self.remotes:
            if remote:
                # Specific remote URL/pattern was passed, ensure that the URL
                # matches or else skip this one
                try:
                    if not fnmatch.fnmatch(repo.url, remote):
                        continue
                except TypeError:
                    # remote was non-string, try again
                    if not fnmatch.fnmatch(repo.url, six.text_type(remote)):
                        continue
            success, failed = repo.lock()
            locked.extend(success)
            errors.extend(failed)
        return locked, errors
Return real part of quaternion.
dataset/ETHPy150Open saltstack/salt/salt/utils/gitfs.py/GitBase.lock--crossover with--dataset/ETHPy150Open IEEERobotics/bot/bot/hardware/complex_hardware/transformations.py/quaternion_real