
from ...utils import is_note_seq_available, is_transformers_available, is_torch_available
from ...utils import OptionalDependencyNotAvailable


try:
       if not (is_transformers_available() and is_torch_available()):
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       from ...utils.dummy_torch_and_transformers_objects import *  # noqa F403
else:
       from .notes_encoder import SpectrogramNotesEncoder
       from .continous_encoder import SpectrogramContEncoder
       from .pipeline_spectrogram_diffusion import (
           SpectrogramContEncoder,
           SpectrogramDiffusionPipeline,
           TaFilmDecoder,
       )

try:
       if not (is_transformers_available() and is_torch_available() and is_note_seq_available()):
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       from ...utils.dummy_transformers_and_torch_and_note_seq_objects import *  # noqa F403
else:
       from .midi_utils import MidiProcessor





from __future__ import annotations





def 	SCREAMING_SNAKE_CASE__    (      __lowerCAmelCase    ,		__lowerCAmelCase							):
    if len(__lowerCAmelCase							) == 0:
        return False
    snake_case__						=				len(__lowerCAmelCase							) // 2
    if a_list[midpoint] == item:
        return True
    if item < a_list[midpoint]:
        return binary_search(a_list[:midpoint]    ,		__lowerCAmelCase							)
    else:
        return binary_search(a_list[midpoint + 1 :]    ,		__lowerCAmelCase							)


if __name__ == "__main__":
     __magic_name__            =  input('''Enter numbers separated by comma:\n''').strip()
     __magic_name__            =  [int(item.strip()) for item in user_input.split(''',''')]
     __magic_name__            =  int(input('''Enter the number to be found in the list:\n''').strip())
     __magic_name__            =  '''''' if binary_search(sequence, target) else '''not '''
     print(F'''{target} was {not_str}found in {sequence}''')



