'''simple docstring'''





import random

def 							UpperCamelCase				(    lowerCAmelCase_       ,					lowerCAmelCase_       ,					lowerCAmelCase_ = False   )		->						dict:




       '''simple docstring'''






       _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 							UpperCamelCase				(    lowerCAmelCase_   )		->						dict:




       '''simple docstring'''






       return {
           i: [j for j in range(lowerCAmelCase_   ) if i != j] for i in range(lowerCAmelCase_   )
       }


if __name__ == "__main__":
      import doctest

      doctest.testmod()
from ..utils import DummyObject, requires_backends





class      lowerCAmelCase						(					metaclass=_a			):
     _SCREAMING_SNAKE_CASE     :     Optional[int]		=["""transformers""", """torch""", """note_seq"""]



     def __init__(					self				,      *lowerCAmelCase__				,      **lowerCAmelCase__       ):
            requires_backends(self				,      ['transformers', 'torch', 'note_seq']       )



     @classmethod
     def 			a__  (					cls				,      *lowerCAmelCase__				,      **lowerCAmelCase__       ):
            requires_backends(cls				,      ['transformers', 'torch', 'note_seq']       )





     @classmethod
     def 			a__  (					cls				,      *lowerCAmelCase__				,      **lowerCAmelCase__       ):
            requires_backends(cls				,      ['transformers', 'torch', 'note_seq']       )