


import os


# All paths are set with the intent you should run this script from the root of the repo with the command
# python utils/check_doctest_list.py
SCREAMING_SNAKE_CASE__					:     List[Any]       =     '.'


if __name__ == "__main__":
 SCREAMING_SNAKE_CASE__					:     Dict       =     os.path.join(REPO_PATH, 'utils/documentation_tests.txt')
 SCREAMING_SNAKE_CASE__					:     List[Any]       =     []
 SCREAMING_SNAKE_CASE__					:     int       =     []
 with open(doctest_file_path) as fp:
  for line in fp:
   SCREAMING_SNAKE_CASE__					:     Optional[int]       =     line.strip()
   SCREAMING_SNAKE_CASE__					:     Tuple       =     os.path.join(REPO_PATH, line)
   if not (os.path.isfile(path) or os.path.isdir(path)):
    non_existent_paths.append(line)
   all_paths.append(path)
 if len(non_existent_paths) > 0:
  SCREAMING_SNAKE_CASE__					:     Any       =     '\n'.join(non_existent_paths)
  raise ValueError(F'`utils/documentation_tests.txt` contains non-existent paths:\n{non_existent_paths}')
 if all_paths != sorted(all_paths):
  raise ValueError('Files in `utils/documentation_tests.txt` are not in alphabetical order.')









# A Bipartite Graph is a graph whose vertices can be divided into two independent sets,
# U and V such that every edge (u, v) either connects a vertex from U to V or a vertex
# from V to U. In other words, for every edge (u, v), either u belongs to U and v to V,
# or u belongs to V and v to U. We can also say that there is no edge that connects
# vertices of same set.




def    a__    (		snake_case__					:							Dict     ):
  _UpperCAmelCase		:							str							=     [False] * len(snake_case__     )
  _UpperCAmelCase		:							str							=     [-1] * len(snake_case__     )

  def dfs(snake_case__					:							Dict						,   snake_case__					:							Optional[Any]     ):
    _UpperCAmelCase		:							str							=     True
    _UpperCAmelCase		:							Optional[Any]							=     c
    for u in graph[v]:
      if not visited[u]:
        dfs(snake_case__						,   1 - c     )

  for i in range(len(snake_case__     )     ):
    if not visited[i]:
      dfs(snake_case__						,   0     )

  for i in range(len(snake_case__     )     ):
    for j in graph[i]:
      if color[i] == color[j]:
        return False

  return True


# Adjacency list of graph
SCREAMING_SNAKE_CASE__					:     Optional[Any]       =     {0: [1, 3], 1: [0, 2], 2: [1, 3], 3: [0, 2], 4: []}





print(check_bipartite_dfs(graph))





