def resolve_parent_registry_name(self, registry_name, suffix):
        """
        Subclasses should override to specify the default suffix, as the
        invocation is done without a suffix.
        """

        if not registry_name.endswith(suffix):
            raise ValueError(
                "child module registry name defined with invalid suffix "
                "('%s' does not end with '%s')" % (registry_name, suffix))
        return registry_name[:-len(suffix)]