import ast


def get_imports(script_source):
    """Parse imported packages and objects imported from packages.

    Args:
        script_source (str): The source code of a Python script.

    Returns:
        packages (list of tuple): List of (package name, None) tuples.
        from_imports (list of tuple): List of (package/module name, some object) tuples. Note that
            some object can be a function, object, module, or package.
    """
    packages = []
    from_imports = []
    ast_of_source = ast.parse(script_source)

    for node in ast_of_source.body:
        # Parse expressions of the form "from X import Y".
        if isinstance(node, ast.ImportFrom):
            module = node.module

            for name in node.names:
                from_imports.append((module, name.name))
        # Parse expressions of the form "import X".
        elif isinstance(node, ast.Import):
            for package in node.names:
                packages.append((package.name, None))

    return packages, from_imports