def delete_isolated_nodes(neighbours_by_time_space):
    """
    The salient features of the function "delete_isolated_nodes" are:
    1. Argument: "neighbours_by_time_space" = a dictionary with keys as the node no.s and the values as their corresponding nearest neighbours in space as well as time
    2. Returns: "final_neighbours" = contains the same dictionary but without the isolated node items
    3. Use: Isolated nodes are those which either don't have any neighbours in space or have neighbours in space but none in time of unpairing.
            For the first scenario, these nodes with no space neighbours are already removed from beforehand.
            But the "neighbours_by_time_space" still contains those node keys which had neighbours in space, but none of them were close in time. So, here, the value will be nil.
            So we remove these nodes from the data structure as they are of no use to us, in terms of studying about the clusters.
    """
    final_neighbours={}
    for i in list(neighbours_by_time_space.keys()):
        if len(neighbours_by_time_space[i])!=0:
            final_neighbours[i]=neighbours_by_time_space[i]
    return final_neighbours