def METHOD_NAME(nodes: List[Node], module_type: Type) -> SourcePartition:
    input_nodes = set()
    output_nodes = set()
    params = set()
    for node in nodes:
        for arg in node.args:
            if isinstance(arg, Node) and arg not in nodes:
                input_nodes.add(arg)
        if node.op == "get_attr":
            params.add(node)
        for user in node.users.keys():
            if user not in nodes:
                output_nodes.add(node)
    return SourcePartition(
        nodes,
        module_type,
        list(input_nodes),
        list(output_nodes),
        list(params),  # type: ignore[arg-type]
    )