
"""simple docstring"""
from __future__ import annotations

import unittest

from transformers import AutoTokenizer, GPTJConfig, is_tf_available
from transformers.testing_utils import require_tf, slow, tooslow

from ...test_configuration_common import ConfigTester
from ...test_modeling_tf_common import TFModelTesterMixin, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin
from ...utils.test_modeling_tf_core import TFCoreModelTesterMixin


if is_tf_available():
			import tensorflow as tf

			from transformers.models.gptj.modeling_tf_gptj import (
			    TFGPTJForCausalLM,
			    TFGPTJForQuestionAnswering,
			    TFGPTJForSequenceClassification,
			    TFGPTJModel,
			    shape_list,
			)




class    _snake_case  :






							def __init__(					self						:			Tuple						, snake_case__						:			Optional[int]    ):






												"""simple docstring"""



												__a:						Union[str, Any]		    =					parent
												__a:						str		    =					1_3
												__a:						List[str]		    =					7
												__a:						Optional[Any]		    =					True
												__a:						str		    =					True
												__a:						Optional[int]		    =					True
												__a:						str		    =					True
												__a:						Dict		    =					True
												__a:						Any		    =					9_9
												__a:						Union[str, Any]		    =					3_2
												__a:						Any		    =					4
												__a:						Optional[int]		    =					2
												__a:						Any		    =					4
												__a:						Optional[Any]		    =					3_7
												__a:						str		    =					"""gelu"""
												__a:						int		    =					0.1
												__a:						str		    =					0.1
												__a:						Optional[Any]		    =					5_1_2
												__a:						Tuple		    =					1_6
												__a:						List[str]		    =					2
												__a:						Dict		    =					0.02
												__a:						Union[str, Any]		    =					3
												__a:						Optional[int]		    =					4
												__a:						Any		    =					None
												__a:						List[Any]		    =					self.vocab_size - 1
												__a:						Tuple		    =					self.vocab_size - 1
												__a:						Optional[Any]		    =					self.vocab_size - 1






							def 							__lowercase  (					self						:			Optional[int]    ):






												"""simple docstring"""



												__a:						Dict		    =					ids_tensor([self.batch_size, self.seq_length]						, self.vocab_size    )

												__a:						Dict		    =					None
												if self.use_input_mask:
																	__a:						List[Any]		    =					random_attention_mask([self.batch_size, self.seq_length]    )

												__a:						List[str]		    =					None
												if self.use_token_type_ids:
																	__a:						int		    =					ids_tensor([self.batch_size, self.seq_length]						, self.type_vocab_size    )

												__a:						str		    =					None
												if self.use_mc_token_ids:
																	__a:						Dict		    =					ids_tensor([self.batch_size, self.num_choices]						, self.seq_length    )

												__a:						str		    =					None
												__a:						Optional[int]		    =					None
												__a:						Optional[int]		    =					None
												if self.use_labels:
																	__a:						int		    =					ids_tensor([self.batch_size]						, self.type_sequence_label_size    )
																	__a:						str		    =					ids_tensor([self.batch_size, self.seq_length]						, self.num_labels    )
																	__a:						List[str]		    =					ids_tensor([self.batch_size]						, self.num_choices    )

												__a:						List[str]		    =					GPTJConfig(
												    vocab_size=self.vocab_size						, n_embd=self.hidden_size						, n_layer=self.num_hidden_layers						, n_head=self.num_attention_heads						, intermediate_size=self.intermediate_size						, hidden_act=self.hidden_act						, hidden_dropout_prob=self.hidden_dropout_prob						, attention_probs_dropout_prob=self.attention_probs_dropout_prob						, n_positions=self.max_position_embeddings						, type_vocab_size=self.type_vocab_size						, initializer_range=self.initializer_range						, bos_token_id=self.bos_token_id						, eos_token_id=self.eos_token_id						, pad_token_id=self.pad_token_id						, rotary_dim=self.rotary_dim						, return_dict=snake_case__						, )

												__a:						str		    =					ids_tensor([self.num_hidden_layers, self.num_attention_heads]						, 2    )

												return (
												    config,
												    input_ids,
												    input_mask,
												    head_mask,
												    token_type_ids,
												    mc_token_ids,
												    sequence_labels,
												    token_labels,
												    choice_labels,
												)






							def 							__lowercase  (					self						:			List[str]						, snake_case__						:			Dict						, snake_case__						:			Tuple						, snake_case__						:			str						, snake_case__						:			List[str]						, snake_case__						:			str						, *snake_case__						:			int    ):






												"""simple docstring"""



												__a:						str		    =					TFGPTJModel(config=snake_case__    )
												__a:						Optional[Any]		    =					{
												    """input_ids""": input_ids,
												    """attention_mask""": input_mask,
												    """token_type_ids""": token_type_ids,
												}
												__a:						Optional[Any]		    =					model(snake_case__    )

												__a:						Optional[Any]		    =					[input_ids, None, input_mask]  # None is the input for 'past'
												__a:						List[Any]		    =					model(snake_case__    )

												__a:						Dict		    =					model(snake_case__    )

												self.parent.assertEqual(result.last_hidden_state.shape						, (self.batch_size, self.seq_length, self.hidden_size)    )






							def 							__lowercase  (					self						:			str						, snake_case__						:			Dict						, snake_case__						:			Union[str, Any]						, snake_case__						:			Tuple						, snake_case__						:			Tuple						, snake_case__						:			str						, *snake_case__						:			Union[str, Any]    ):






												"""simple docstring"""



												__a:						str		    =					TFGPTJModel(config=snake_case__    )

												# first forward pass
												__a:						Dict		    =					model(snake_case__						, token_type_ids=snake_case__						, use_cache=snake_case__    )
												__a:						List[str]		    =					model(snake_case__						, token_type_ids=snake_case__    )
												__a:						List[Any]		    =					model(snake_case__						, token_type_ids=snake_case__						, use_cache=snake_case__    )

												self.parent.assertTrue(len(snake_case__    ) == len(snake_case__    )    )
												self.parent.assertTrue(len(snake_case__    ) == len(snake_case__    ) + 1    )

												__a    ,				__a:						Any		    =					outputs.to_tuple()

												# create hypothetical next token and extent to next_input_ids
												__a:						List[Any]		    =					ids_tensor((self.batch_size, 1)						, config.vocab_size    )
												__a:						str		    =					ids_tensor([self.batch_size, 1]						, self.type_vocab_size    )

												# append to next input_ids and token_type_ids
												__a:						int		    =					tf.concat([input_ids, next_tokens]						, axis=-1    )
												__a:						str		    =					tf.concat([token_type_ids, next_token_types]						, axis=-1    )

												__a:						List[Any]		    =					model(snake_case__						, token_type_ids=snake_case__    )["""last_hidden_state"""]
												__a:						Dict		    =					model(snake_case__						, token_type_ids=snake_case__						, past_key_values=snake_case__    )[
												    """last_hidden_state"""
												]

												# select random slice
												__a:						Dict		    =					int(ids_tensor((1,)						, shape_list(snake_case__    )[-1]    )    )
												__a:						List[str]		    =					output_from_no_past[:, -1, random_slice_idx]
												__a:						List[str]		    =					output_from_past[:, 0, random_slice_idx]

												# test that outputs are equal for slice
												tf.debugging.assert_near(snake_case__						, snake_case__						, rtol=1e-6    )






							def 							__lowercase  (					self						:			List[str]						, snake_case__						:			Any						, snake_case__						:			List[str]						, snake_case__						:			Union[str, Any]						, snake_case__						:			Any						, snake_case__						:			Union[str, Any]						, *snake_case__						:			Any    ):






												"""simple docstring"""



												__a:						Optional[Any]		    =					TFGPTJModel(config=snake_case__    )

												# create attention mask
												__a:						int		    =					self.seq_length // 2
												__a:						List[Any]		    =					tf.ones((self.batch_size, half_seq_length)						, dtype=tf.intaa    )
												__a:						str		    =					tf.zeros((self.batch_size, self.seq_length - half_seq_length)						, dtype=tf.intaa    )
												__a:						Optional[int]		    =					tf.concat([attn_mask_begin, attn_mask_end]						, axis=1    )

												# first forward pass
												__a    ,				__a:						Dict		    =					model(snake_case__						, attention_mask=snake_case__    ).to_tuple()

												# create hypothetical next token and extent to next_input_ids
												__a:						str		    =					ids_tensor((self.batch_size, 1)						, config.vocab_size    )

												# change a random masked slice from input_ids
												__a:						List[str]		    =					ids_tensor((1,)						, snake_case__    ).numpy() + 1
												__a:						str		    =					ids_tensor((self.batch_size, self.seq_length)						, config.vocab_size    )
												__a:						Tuple		    =					tf.range(self.seq_length    ) == (self.seq_length - random_seq_idx_to_change)
												__a:						Optional[int]		    =					tf.transpose(
												    tf.broadcast_to(tf.expand_dims(snake_case__						, -1    )						, (self.seq_length, self.batch_size)    )    )
												__a:						Optional[int]		    =					tf.where(snake_case__						, snake_case__						, snake_case__    )

												# append to next input_ids and attn_mask
												__a:						Union[str, Any]		    =					tf.concat([input_ids, next_tokens]						, axis=-1    )
												__a:						Any		    =					tf.concat([attn_mask, tf.ones((shape_list(snake_case__    )[0], 1)						, dtype=tf.intaa    )]						, axis=1    )

												# get two different outputs
												__a:						Any		    =					model(snake_case__						, attention_mask=snake_case__    )["""last_hidden_state"""]
												__a:						Dict		    =					model(snake_case__						, past_key_values=snake_case__						, attention_mask=snake_case__    )[
												    """last_hidden_state"""
												]

												# select random slice
												__a:						Optional[int]		    =					int(ids_tensor((1,)						, shape_list(snake_case__    )[-1]    )    )
												__a:						List[str]		    =					output_from_no_past[:, -1, random_slice_idx]
												__a:						List[Any]		    =					output_from_past[:, 0, random_slice_idx]

												# test that outputs are equal for slice
												tf.debugging.assert_near(snake_case__						, snake_case__						, rtol=1e-12    )






							def 							__lowercase  (					self						:			List[str]						, snake_case__						:			Any						, snake_case__						:			Dict						, snake_case__						:			int						, snake_case__						:			Any						, snake_case__						:			List[str]						, *snake_case__						:			Union[str, Any]    ):






												"""simple docstring"""



												__a:						int		    =					TFGPTJModel(config=snake_case__    )

												__a:						str		    =					input_ids[:1, :]
												__a:						Optional[Any]		    =					input_mask[:1, :]
												__a:						Optional[int]		    =					token_type_ids[:1, :]
												__a:						str		    =					1

												# first forward pass
												__a:						Optional[Any]		    =					model(snake_case__						, attention_mask=snake_case__						, token_type_ids=snake_case__						, use_cache=snake_case__    )

												__a    ,				__a:						Dict		    =					outputs.to_tuple()

												# create hypothetical next token and extent to next_input_ids
												__a:						str		    =					ids_tensor((self.batch_size, 3)						, config.vocab_size    )
												__a:						str		    =					ids_tensor((self.batch_size, 3)						, 2    )
												__a:						List[str]		    =					ids_tensor((self.batch_size, 3)						, self.type_vocab_size    )

												# append to next input_ids and token_type_ids
												__a:						Union[str, Any]		    =					tf.concat([input_ids, next_tokens]						, axis=-1    )
												__a:						str		    =					tf.concat([input_mask, next_attn_mask]						, axis=-1    )
												__a:						str		    =					tf.concat([token_type_ids, next_token_types]						, axis=-1    )

												__a:						Tuple		    =					model(
												    snake_case__						, token_type_ids=snake_case__						, attention_mask=snake_case__    )["""last_hidden_state"""]
												__a:						List[str]		    =					model(
												    snake_case__						, token_type_ids=snake_case__						, attention_mask=snake_case__						, past_key_values=snake_case__						, )["""last_hidden_state"""]
												self.parent.assertTrue(output_from_past.shape[1] == next_tokens.shape[1]    )

												# select random slice
												__a:						Any		    =					int(ids_tensor((1,)						, shape_list(snake_case__    )[-1]    )    )
												__a:						Optional[Any]		    =					output_from_no_past[:, -3:, random_slice_idx]
												__a:						Any		    =					output_from_past[:, :, random_slice_idx]

												# test that outputs are equal for slice
												tf.debugging.assert_near(snake_case__						, snake_case__						, rtol=1e-3    )






							def 							__lowercase  (					self						:			List[Any]						, snake_case__						:			Optional[Any]						, snake_case__						:			Union[str, Any]						, snake_case__						:			Tuple						, snake_case__						:			Union[str, Any]						, snake_case__						:			Tuple						, *snake_case__						:			Dict    ):






												"""simple docstring"""



												__a:						Union[str, Any]		    =					TFGPTJForCausalLM(config=snake_case__    )
												__a:						Union[str, Any]		    =					{
												    """input_ids""": input_ids,
												    """attention_mask""": input_mask,
												    """token_type_ids""": token_type_ids,
												}
												__a:						List[Any]		    =					model(snake_case__    )
												self.parent.assertEqual(result.logits.shape						, (self.batch_size, self.seq_length, self.vocab_size)    )






							def 							__lowercase  (					self						:			List[Any]    ):






												"""simple docstring"""



												__a:						int		    =					self.prepare_config_and_inputs()

												(
												    (
												    __a
												)    ,				(
												    __a
												)    ,				(
												    __a
												)    ,				(
												    __a
												)    ,				(
												    __a
												)    ,				(
												    __a
												)    ,				(
												    __a
												)    ,				(
												    __a
												)    ,				(
												    __a
												)    ,				
												):						Optional[Any]		    =					config_and_inputs

												__a:						List[str]		    =					{
												    """input_ids""": input_ids,
												    """token_type_ids""": token_type_ids,
												    """attention_mask""": input_mask,
												}
												return config, inputs_dict






@require_tf
class    _snake_case  (						_lowercase ,				_lowercase ,				_lowercase ,				unittest.TestCase       ):
							SCREAMING_SNAKE_CASE		     =						(
							    (TFGPTJForCausalLM, TFGPTJForSequenceClassification, TFGPTJForQuestionAnswering, TFGPTJModel)
							    if is_tf_available()
							    else ()
							)

							SCREAMING_SNAKE_CASE		     =						(TFGPTJForCausalLM,) if is_tf_available() else ()
							SCREAMING_SNAKE_CASE		     =						(
							    {
							        '''feature-extraction''': TFGPTJModel,
							        '''question-answering''': TFGPTJForQuestionAnswering,
							        '''text-classification''': TFGPTJForSequenceClassification,
							        '''text-generation''': TFGPTJForCausalLM,
							        '''zero-shot''': TFGPTJForSequenceClassification,
							    }
							    if is_tf_available()
							    else {}
							)
							SCREAMING_SNAKE_CASE		     =						False
							SCREAMING_SNAKE_CASE		     =						False
							SCREAMING_SNAKE_CASE		     =						False
							SCREAMING_SNAKE_CASE		     =						False






							def 							__lowercase  (					self						:			str						, snake_case__						:			int						, snake_case__						:			List[Any]						, snake_case__						:			Optional[int]						, snake_case__						:			List[Any]						, snake_case__						:			str    ):






												"""simple docstring"""



												if (
												    pipeline_test_casse_name == "QAPipelineTests"
												    and tokenizer_name is not None
												    and not tokenizer_name.endswith("""Fast"""    )
												):
																	# `QAPipelineTests` fails for a few models when the slower tokenizer are used.
																	# (The slower tokenizers were never used for pipeline tests before the pipeline testing rework)
																	# TODO: check (and possibly fix) the `QAPipelineTests` with slower tokenizer
																	return True

												return False






							def 							__lowercase  (					self						:			List[str]    ):






												"""simple docstring"""



												__a:						Tuple		    =					TFGPTJModelTester(self    )
												__a:						Optional[int]		    =					ConfigTester(self						, config_class=snake_case__						, n_embd=3_7    )






							def 							__lowercase  (					self						:			Optional[Any]    ):






												"""simple docstring"""



												self.config_tester.run_common_tests()






							def 							__lowercase  (					self						:			Any    ):






												"""simple docstring"""



												__a:						Any		    =					self.model_tester.prepare_config_and_inputs()
												self.model_tester.create_and_check_gptj_model(*snake_case__    )






							def 							__lowercase  (					self						:			List[Any]    ):






												"""simple docstring"""



												__a:						List[Any]		    =					self.model_tester.prepare_config_and_inputs()
												self.model_tester.create_and_check_gptj_model_past(*snake_case__    )






							def 							__lowercase  (					self						:			int    ):






												"""simple docstring"""



												__a:						List[Any]		    =					self.model_tester.prepare_config_and_inputs()
												self.model_tester.create_and_check_gptj_model_attention_mask_past(*snake_case__    )






							def 							__lowercase  (					self						:			Optional[int]    ):






												"""simple docstring"""



												__a:						Optional[int]		    =					self.model_tester.prepare_config_and_inputs()
												self.model_tester.create_and_check_gptj_model_past_large_inputs(*snake_case__    )






							def 							__lowercase  (					self						:			List[str]    ):






												"""simple docstring"""



												__a:						List[str]		    =					self.model_tester.prepare_config_and_inputs()
												self.model_tester.create_and_check_gptj_lm_head_model(*snake_case__    )






							@slow
							@unittest.skipIf(
							    not is_tf_available() or len(tf.config.list_physical_devices("""GPU"""    )    ) > 0						, """skip testing on GPU for now to avoid GPU OOM."""						, )
							def 							__lowercase  (					self						:			Union[str, Any]    ):






												"""simple docstring"""



												__a:						int		    =					TFGPTJModel.from_pretrained("""EleutherAI/gpt-j-6B"""						, from_pt=snake_case__    )
												self.assertIsNotNone(snake_case__    )






							@unittest.skip(reason="""Currently, model embeddings are going to undergo a major refactor."""    )
							def 							__lowercase  (					self						:			Optional[Any]    ):






												"""simple docstring"""



												super().test_resize_token_embeddings()






@require_tf
@tooslow
# Marked as @tooslow due to GPU OOM -- but still useful to run locally. Requires ~39GB of RAM.
class    _snake_case  (						unittest.TestCase       ):






							def 							__lowercase  (					self						:			Union[str, Any]    ):






												"""simple docstring"""



												__a:						List[Any]		    =					TFGPTJForCausalLM.from_pretrained("""EleutherAI/gpt-j-6B"""						, from_pt=snake_case__    )
												__a:						Optional[Any]		    =					tf.convert_to_tensor([[4_6_4, 3_2_9_0]]						, dtype=tf.intaa    )  # The dog
												# fmt: off
												# The dog is a man's best friend. It is a loyal companion, and it is a friend
												__a:						List[Any]		    =					[4_6_4, 3_2_9_0, 3_1_8, 2_5_7, 5_8_2, 3_3_8, 1_2_6_6, 1_5_4_5, 1_3, 6_3_2, 3_1_8, 2_5_7, 9_1_1_2, 1_5_1_8_5, 1_1, 2_9_0, 3_4_0, 3_1_8, 2_5_7, 1_5_4_5]
												# fmt: on
												__a:						Optional[int]		    =					model.generate(snake_case__						, do_sample=snake_case__    )
												self.assertListEqual(output_ids[0].numpy().tolist()						, snake_case__    )






							def 							__lowercase  (					self						:			Tuple    ):






												"""simple docstring"""



												__a:						int		    =					AutoTokenizer.from_pretrained("""EleutherAI/gpt-j-6B"""						, revision="""float16"""    )
												__a:						List[str]		    =					TFGPTJForCausalLM.from_pretrained("""EleutherAI/gpt-j-6B"""						, revision="""float16"""						, from_pt=snake_case__    )

												__a:						Dict		    =					tokenizer("""Today is a nice day and"""						, return_tensors="""tf"""    )
												# forces the generation to happen on CPU, to avoid GPU-related quirks
												with tf.device(""":/CPU:0"""    ):
																	__a:						Union[str, Any]		    =					model.generate(**snake_case__						, do_sample=snake_case__						, seed=[4_2, 0]    )
												__a:						str		    =					tokenizer.decode(output_ids[0]						, skip_special_tokens=snake_case__    )

												__a:						str		    =					"""Today is a nice day and I’m going to go for a walk. I’"""
												self.assertEqual(snake_case__						, snake_case__    )






							def 							__lowercase  (					self						:			Tuple    ):






												"""simple docstring"""



												__a:						Union[str, Any]		    =					TFGPTJForCausalLM.from_pretrained("""EleutherAI/gpt-j-6B"""						, revision="""float16"""						, from_pt=snake_case__    )
												__a:						Tuple		    =					AutoTokenizer.from_pretrained("""EleutherAI/gpt-j-6B"""						, revision="""float16"""    )

												__a:						Dict		    =					"""left"""

												# Define PAD Token = EOS Token = 50256
												__a:						List[Any]		    =					tokenizer.eos_token
												__a:						int		    =					model.config.eos_token_id

												# use different length sentences to test batching
												__a:						List[Any]		    =					[
												    """Hello, my dog is a little""",
												    """Today, I""",
												]
												__a:						Optional[int]		    =					[
												    """Hello, my dog is a little over a year old and has been diagnosed with hip dysplasia""",
												    """Today, I’m going to be talking about a topic that’""",
												]
												return model, tokenizer, sentences, expected_output_sentences






							def 							__lowercase  (					self						:			Optional[Any]    ):






												"""simple docstring"""



												__a    ,				__a    ,				__a    ,				__a:						int		    =					self._get_beam_search_test_objects()

												__a:						List[str]		    =					tokenizer(snake_case__						, return_tensors="""tf"""						, padding=snake_case__    )
												__a:						Optional[int]		    =					model.generate(**snake_case__						, do_sample=snake_case__						, num_beams=2    )
												__a:						Optional[int]		    =					tokenizer.batch_decode(snake_case__						, skip_special_tokens=snake_case__    )
												self.assertListEqual(snake_case__						, snake_case__    )






							def 							__lowercase  (					self						:			Union[str, Any]    ):






												"""simple docstring"""



												__a    ,				__a    ,				__a    ,				__a:						List[Any]		    =					self._get_beam_search_test_objects()

												__a:						Optional[int]		    =					tokenizer(snake_case__						, return_tensors="""tf"""						, padding=snake_case__    )
												__a:						Union[str, Any]		    =					tokenizer(sentences[0]						, return_tensors="""tf"""    )
												__a:						Optional[int]		    =					model.generate(**snake_case__						, do_sample=snake_case__						, num_beams=2    )
												__a:						Any		    =					(
												    shape_list(inputs_non_padded["""input_ids"""]    )[-1]
												    - tf.reduce_sum(tf.cast(inputs["""attention_mask"""][-1]						, tf.intaa    )    ).numpy()
												)
												__a:						Dict		    =					tokenizer(sentences[1]						, return_tensors="""tf"""    )
												__a:						Tuple		    =					model.generate(
												    **snake_case__						, do_sample=snake_case__						, num_beams=2						, max_length=model.config.max_length - num_paddings    )
												__a:						int		    =					tokenizer.decode(output_non_padded[0]						, skip_special_tokens=snake_case__    )
												__a:						Optional[int]		    =					tokenizer.decode(output_padded[0]						, skip_special_tokens=snake_case__    )
												self.assertListEqual(snake_case__						, [non_padded_sentence, padded_sentence]    )






							def 							__lowercase  (					self						:			Dict    ):






												"""simple docstring"""



												__a    ,				__a    ,				__a    ,				__a:						Dict		    =					self._get_beam_search_test_objects()

												__a:						Any		    =					tokenizer(snake_case__						, return_tensors="""tf"""						, padding=snake_case__    )
												__a:						Any		    =					tf.function(model.generate						, jit_compile=snake_case__    )
												__a:						Optional[Any]		    =					xla_generate(**snake_case__						, do_sample=snake_case__						, num_beams=2    )
												__a:						Union[str, Any]		    =					tokenizer.batch_decode(snake_case__						, skip_special_tokens=snake_case__    )
												self.assertListEqual(snake_case__						, snake_case__    )


"""simple docstring"""
def     lowerCamelCase_    (	lowerCamelCase_	,				lowerCamelCase_ )     ->			int:


					'''simple docstring'''
					for index, item in enumerate(lowerCamelCase_ ):
										if item == target:
															return index
					return -1


def     lowerCamelCase_    (	lowerCamelCase_	,				lowerCamelCase_	,				lowerCamelCase_	,				lowerCamelCase_ )     ->			int:


					'''simple docstring'''
					if not (0 <= high < len(lowerCamelCase_ ) and 0 <= low < len(lowerCamelCase_ )):
										raise Exception("""Invalid upper or lower bound!""" )
					if high < low:
										return -1
					if sequence[low] == target:
										return low
					if sequence[high] == target:
										return high
					return rec_linear_search(lowerCamelCase_	,				low + 1	,				high - 1	,				lowerCamelCase_ )


if __name__ == "__main__":
			lowercase		:						str =					input('Enter numbers separated by comma:\n').strip()
			lowercase		:						int =					[int(item.strip()) for item in user_input.split(',')]

			lowercase		:						Optional[Any] =					int(input('Enter a single number to be found in the list:\n').strip())
			lowercase		:						str =					linear_search(sequence, target)
			if result != -1:
						print(F"linear_search({sequence}, {target}) = {result}")
			else:
						print(F"{target} was not found in {sequence}")
