Sets the current registry used in ``web3.pm`` functions that read/write to an on-chain
        registry. This method accepts checksummed/canonical addresses or ENS names. Addresses
        must point to an instance of the Vyper Reference Registry implementation.
        If you want to use a different registry implementation with ``web3.pm``, manually
        set the ``web3.pm.registry`` attribute to any subclass of ``ERCRegistry``.

        To use an ENS domain as the address, make sure a valid ENS instance set as ``web3.ens``.

        * Parameters:
            * ``address``: Address of on-chain Vyper Reference Registry.

def set_registry(self, address: Address) -> None:
        """
        Sets the current registry used in ``web3.pm`` functions that read/write to an on-chain
        registry. This method accepts checksummed/canonical addresses or ENS names. Addresses
        must point to an instance of the Vyper Reference Registry implementation.
        If you want to use a different registry implementation with ``web3.pm``, manually
        set the ``web3.pm.registry`` attribute to any subclass of ``ERCRegistry``.

        To use an ENS domain as the address, make sure a valid ENS instance set as ``web3.ens``.

        * Parameters:
            * ``address``: Address of on-chain Vyper Reference Registry.
        """
        if is_canonical_address(address) or is_checksum_address(address):
            canonical_address = to_canonical_address(address)
            self.registry = VyperReferenceRegistry(canonical_address, self.web3)
        elif is_ens_name(address):
            self._validate_set_ens()
            addr_lookup = self.web3.ens.address(address)
            if not addr_lookup:
                raise NameNotFound(
                    "No address found after ENS lookup for name: {0}.".format(address)
                )
            self.registry = VyperReferenceRegistry(
                to_canonical_address(addr_lookup), self.web3
            )
        else:
            raise PMError(
                "Expected a canonical/checksummed address or ENS name for the address, "
                "instead received {0}.".format(type(address))
            )