<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def bind(self, map: Map) -> None: """Bind the Rule to a Map and compile it."""

        if self.map is not None:
            raise RuntimeError(f"{self!r} is already bound to {self.map!r}")

        self.map = map

        pattern = ''
        builder = ''
        full_rule = "{}\\|{}".format(self.host or '', self.rule)
        for part in _parse_rule(full_rule):
            if isinstance(part, VariablePart):
                converter = self.map.converters[part.converter](
                    *part.arguments[0], **part.arguments[1],
                )
                pattern += f"(?P<{part.name}>{converter.regex})"
                self._converters[part.name] = converter
                builder += '{' + part.name + '}'
                self._weights.append(WeightedPart(True, converter.weight))
            else:
                builder += part
                pattern += part
                self._weights.append(WeightedPart(False, -len(part)))
        if not self.is_leaf or not self.strict_slashes:
            # Pattern should match with or without a trailing slash
            pattern = f"{pattern.rstrip('/')}(?<!/)(?P<__slash__>/?)$"
        else:
            pattern = f"{pattern}$"
        self._pattern = re.compile(pattern)
        self._builder = builder