(node, package_name)
return (
        node.level
        or node.modname == package_name
        or node.modname.startswith(package_name + ".")
    )
Check if a node is an import from the local package.

    :param node: The node to check.
    :type node: astroid.node.NodeNG

    :param package_name: The name of the local package.
    :type package_name: str

    :returns: True if the node is an import from the local package,
        False otherwise.
    :rtype: bool
Check if a node is an import from the local package.
Check if a node is an import from the local package .
def is_local_import_from(node, package_name):
    """Check if a node is an import from the local package.

    :param node: The node to check.
    :type node: astroid.node.NodeNG

    :param package_name: The name of the local package.
    :type package_name: str

    :returns: True if the node is an import from the local package,
        False otherwise.
    :rtype: bool
    """
    if not isinstance(node, astroid.ImportFrom):
        return False

    return (
        node.level
        or node.modname == package_name
        or node.modname.startswith(package_name + ".")
    )
def is_local_import_from ( node , package_name ) : if not isinstance ( node , astroid . ImportFrom ) : return False return ( node . level or node . modname == package_name or node . modname . startswith ( package_name + "." ) )