


def 							UpperCamelCase_(					_A :Union[str, Any]	)->		Union[str, Any]:
			UpperCamelCase__       =							[False] * len(A__	)
			UpperCamelCase__       =							[-1] * len(A__	)

			def dfs(_A :Union[str, Any]					,  _A :List[str]	):
						UpperCamelCase__       =							True
						UpperCamelCase__       =							c
						for u in graph[v]:
									if not visited[u]:
												dfs(A__					,  1 - c	)

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

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

			return True


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







print(check_bipartite_dfs(graph))






'''simple docstring'''






from typing import Union

import fire
import torch
from tqdm import tqdm







def 							UpperCamelCase_     (       A__   :  str				,       A__   :  str = "cpu"				,       A__   :  Union[str, None] = None   ):
  '''simple docstring'''





  lowerCAmelCase_     : Dict     =  torch.load(A__				,       map_location=A__   )
  for k, v in tqdm(state_dict.items()   ):
    if not isinstance(A__				,       torch.Tensor   ):
      raise TypeError("""FP16 conversion only works on paths that are saved state dicts, like pytorch_model.bin"""   )
    lowerCAmelCase_     : List[str]     =  v.half()
  if save_path is None:  # overwrite src_path
    lowerCAmelCase_     : List[str]     =  src_path
  torch.save(A__				,       A__   )


if __name__ == "__main__":
  fire.Fire(convert)



