def is_parent_already_assigned(task, parent_id):

    """
    Checks whether the given node is already assigned as parent or not

    Args:
        task (Node)
        parent_id (fw_id)

    Returns:
        int
    """
    parents = task.get_parents()
    for parent in parents:
        if parent.get_fw_id() == parent_id:
            return True
    return False