def child_fun(current_person):
    """This function checks whether the person has a child or not and works
    accordingly.

    Parameters:
      current_person:
        The current Person object.

    Returns:
      The picked child number and the children list as a tuple.
    """
    ch_lst = current_person.get_children()
    if len(ch_lst) == 0:
        print(f"No children found for {current_person.get_name()}.")
        picked_ch = 0

    else:
        for idx, child in enumerate(ch_lst):
            print(f'{idx + 1}) {child.get_name()}')
        picked_ch = int(input("Select a child (or 0 to go back to main menu): "))
        print()
        if picked_ch == 0:
            print("Returning to main menu.")

    return picked_ch, ch_lst