



import random





def   __snake_case			(    _UpperCAmelCase     ,				_UpperCAmelCase     ,				_UpperCAmelCase = False       )     ->   Tuple:
    __a		 =       {i: [] for i in range(_lowerCamelCase       )}

    # if probability is greater or equal than 1, then generate a complete graph
    if probability >= 1:
        return complete_graph(_lowerCamelCase       )
    # if probability is lower or equal than 0, then return a graph without edges
    if probability <= 0:
        return graph

    # for each couple of nodes, add an edge from u to v
    # if the number randomly generated is greater than probability probability
    for i in range(_lowerCamelCase       ):
        for j in range(i + 1     ,				_lowerCamelCase       ):
            if random.random() < probability:
                graph[i].append(_lowerCamelCase       )
                if not directed:
                    # if the graph is undirected, add an edge in from j to i, either
                    graph[j].append(_lowerCamelCase       )
    return graph





def   __snake_case			(    _UpperCAmelCase       )     ->   Union[str, Any]:
    return {
        i: [j for j in range(_lowerCamelCase       ) if i != j] for i in range(_lowerCamelCase       )
    }


if __name__ == "__main__":
 import doctest

 doctest.testmod()










def   __snake_case			(    _UpperCAmelCase     ,				_UpperCAmelCase = False       ):

    if not isinstance(_UpperCAmelCase     ,				_UpperCAmelCase       ):
        __a		 =       f'Expected string as input, found {type(_UpperCAmelCase       )}'
        raise ValueError(_UpperCAmelCase       )
    if not isinstance(_UpperCAmelCase     ,				_UpperCAmelCase       ):
        __a		 =       f'Expected boolean as use_pascal parameter, found {type(_UpperCAmelCase       )}'
        raise ValueError(_UpperCAmelCase       )

    __a		 =       input_str.split('''_'''       )

    __a		 =       0 if use_pascal else 1

    __a		 =       words[start_index:]

    __a		 =       [word[0].upper() + word[1:] for word in words_to_capitalize]

    __a		 =       '''''' if use_pascal else words[0]

    return "".join([initial_word, *capitalized_words]       )


if __name__ == "__main__":
 from doctest import testmod

 testmod()





