def METHOD_NAME(self, node: ImportFrom) -> Any:
    # Check that there are no relative imports that attempt to read from a parent module. We've found that there
    # generally is no good reason to have such imports.
    if node.level >= 2:
        raise ValueError(
            f"Import in {self._module} attempts to import from parent module using relative import. Please "
            f"switch to absolute import instead."
        )
    # Figure out which module to import in the case where this is a...
    if node.level == 0:
        # (1) absolute import where a submodule is specified
        assert node.module is not None
        module_to_import: str = node.module
    elif node.module is None:
        # (2) relative import where no module is specified (ie: "from . import foo")
        module_to_import = self._module
    else:
        # (3) relative import where a submodule is specified (ie: "from .bar import foo")
        module_to_import = f"{self._module}.{node.module}"
    # We're only looking at imports of objects defined inside this top-level package
    if not module_to_import.startswith(self._top_level_module):
        return
    # Actually import the module and iterate through all the objects potentially exported by it.
    module = import_module(module_to_import)
    for alias in node.names:
        assert hasattr(module, alias.name), f"Module {module} has no attribute {alias.name}"
        attr = getattr(module, alias.name)
        # For some objects (pretty much everything except for classes and functions), we are not able to figure
        # out which module they were defined in... in that case there's not much we can do here, since we cannot
        # easily figure out where we *should* be importing this from in the first place.
        if isinstance(attr, type) or callable(attr):
            attribute_module = attr.__module__
        else:
            continue
        # Figure out where we should be importing this class from, and assert that the *actual* import we found
        # matches the place we *should* import from.
        should_import_from = self._get_module_should_import(module_to_import=attribute_module)
        # click-decorated commands are buggy with this system, probably a problem in click decorators
        if should_import_from == "click.core":
            continue
        assert module_to_import == should_import_from, (
            f"Imported {alias.name} from {module_to_import}, which is not the public module where this object "
            f"is defined. Please import from {should_import_from} instead."
        )