

'''simple docstring'''




from __future__ import annotations

from collections.abc import Generator


def       lowerCamelCase__		(						SCREAMING_SNAKE_CASE      :   int						):
  if not isinstance(SCREAMING_SNAKE_CASE       ,   SCREAMING_SNAKE_CASE						) or n < 1:
    raise Exception('Sequence only defined for positive integers'						)

  yield n
  while n != 1:
    if n % 2 == 0:
      n //= 2
    else:
      UpperCAmelCase													=	3 * n + 1
    yield n


def       lowerCamelCase__		(						):
  UpperCAmelCase													=	43
  UpperCAmelCase													=	tuple(collatz_sequence(SCREAMING_SNAKE_CASE						)						)
  print(SCREAMING_SNAKE_CASE						)
  print(f'''Collatz sequence from {n} took {len(SCREAMING_SNAKE_CASE						)} steps.'''						)


if __name__ == "__main__":
      main()





'''simple docstring'''




_a				: Tuple 							=						'\n# Diffusers installation\n! pip install diffusers transformers datasets accelerate\n# To install from source instead of the last release, comment the command above and uncomment the following one.\n# ! pip install git+https://github.com/huggingface/diffusers.git\n'

_a				: Tuple 							=						[{'type': 'code', 'content': INSTALL_CONTENT}]


