'''simple docstring'''




from datetime import datetime

import matplotlib.pyplot as plt
import torch






def __lowerCAmelCase			(							UpperCamelCase__    )     ->   Optional[int]:
    for param in module.parameters():
        __lowerCamelCase          =  False






def __lowerCAmelCase			(							)     ->   Union[str, Any]:
    __lowerCamelCase          =  '''cuda''' if torch.cuda.is_available() else '''cpu'''
    if torch.backends.mps.is_available() and torch.backends.mps.is_built():
        __lowerCamelCase          =  '''mps'''
    if device == "mps":
        print(
            '''WARNING: MPS currently doesn\'t seem to work, and messes up backpropagation without any visible torch'''
            ''' errors. I recommend using CUDA on a colab notebook or CPU instead if you\'re facing inexplicable issues'''
            ''' with generations.'''    )
    return device






def __lowerCAmelCase			(							UpperCamelCase__    )     ->   int:
    __lowerCamelCase          =  plt.imshow(UpperCamelCase__    )
    fig.axes.get_xaxis().set_visible(UpperCamelCase__    )
    fig.axes.get_yaxis().set_visible(UpperCamelCase__    )
    plt.show()






def __lowerCAmelCase			(							)     ->   Optional[Any]:
    __lowerCamelCase          =  datetime.now()
    __lowerCamelCase          =  current_time.strftime('''%H:%M:%S'''    )
    return timestamp

'''simple docstring'''




from __future__ import annotations

from typing import Any






def __lowerCAmelCase			(							UpperCamelCase__    )     ->   None:
    create_state_space_tree(UpperCamelCase__    ,  []    ,  0    )






def __lowerCAmelCase			(							UpperCamelCase__    ,  UpperCamelCase__    ,  UpperCamelCase__    )     ->   None:

    if index == len(UpperCamelCase__    ):
        print(UpperCamelCase__    )
        return

    create_state_space_tree(UpperCamelCase__    ,  UpperCamelCase__    ,  index + 1    )
    current_subsequence.append(sequence[index]    )
    create_state_space_tree(UpperCamelCase__    ,  UpperCamelCase__    ,  index + 1    )
    current_subsequence.pop()


if __name__ == "__main__":
  __UpperCAmelCase												=[3, 1, 2, 4]
  generate_all_subsequences(seq)

  seq.clear()
  seq.extend(["A", "B", "C"])
  generate_all_subsequences(seq)
