code: 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 + ".")
      )
docs: 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