


'''simple docstring'''






def 							UpperCamelCase_     (       A__   :  str   ):
  '''simple docstring'''





  if not all(char in """01""" for char in bin_string   ):
    raise ValueError("""Non-binary value was passed to the function"""   )
  if not bin_string:
    raise ValueError("""Empty string was passed to the function"""   )
  lowerCAmelCase_     : Union[str, Any]     =  """"""
  while len(A__   ) % 3 != 0:
    lowerCAmelCase_     : str     =  """0""" + bin_string
  lowerCAmelCase_     : str     =  [
      bin_string[index : index + 3]
      for index in range(len(A__   )   )
      if index % 3 == 0
  ]
  for bin_group in bin_string_in_3_list:
    lowerCAmelCase_     : Dict     =  0
    for index, val in enumerate(A__   ):
      oct_val += int(2 ** (2 - index) * int(A__   )   )
    oct_string += str(A__   )
  return oct_string


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

  testmod()







'''simple docstring'''






from ...utils import is_torch_available, is_transformers_available


if is_transformers_available() and is_torch_available():
  from .pipeline_vq_diffusion import LearnedClassifierFreeSamplingEmbeddings, VQDiffusionPipeline



