def METHOD_NAME(file_path, db_path):
    """Build cluster according to the host file.
    Args:
        file_path :  the path of host file.
    Returns:
        Cluster: return cluster object.
    """
    from neural_solution.backend.cluster import Cluster, Node
    # If no file is specified, build a local cluster
    if file_path == "None" or file_path is None:
        return build_local_cluster(db_path)
    if not os.path.exists(file_path):
        raise Exception(f"Please check the path of host file: {file_path}.")
    node_lst = []
    num_threads_per_process = 5
    with open(file_path, "r") as f:
        for line in f:
            hostname, num_sockets, num_cores_per_socket = line.strip().split(" ")
            num_sockets, num_cores_per_socket = int(num_sockets), int(num_cores_per_socket)
            node = Node(name=hostname, num_sockets=num_sockets, num_cores_per_socket=num_cores_per_socket)
            node_lst.append(node)
            num_threads_per_process = num_cores_per_socket
    cluster = Cluster(node_lst=node_lst, db_path=db_path)
    return cluster, num_threads_per_process