def _bind_device(self):
        """
        This method implements ``_bind_device`` from :class:`~lewis.core.devices.InterfaceBase`.
        It binds Cmd and Var definitions to implementations in Interface and Device.
        """
        patterns = set()

        self.bound_commands = []

        for cmd in self.commands:
            bound = cmd.bind(self) or cmd.bind(self.device) or None

            if bound is None:
                raise RuntimeError(
                    'Unable to produce callable object for non-existing member \'{}\' '
                    'of device or interface.'.format(cmd.func))

            for bound_cmd in bound:
                pattern = bound_cmd.matcher.pattern
                if pattern in patterns:
                    raise RuntimeError(
                        'The regular expression {} is '
                        'associated with multiple commands.'.format(pattern))

                patterns.add(pattern)

                self.bound_commands.append(bound_cmd)