


'''simple docstring'''
def    a__			(   lowerCAmelCase__		)       ->      str:
    # if the collection is empty, returns empty
    if collection == []:
        return []

    # get some information about the collection
    UpperCAmelCase__     :						Optional[int]						=							len(lowerCAmelCase__		)
    UpperCAmelCase__     :						int						=							max(lowerCAmelCase__		)
    UpperCAmelCase__     :						Optional[int]						=							min(lowerCAmelCase__		)

    # create the counting array
    UpperCAmelCase__     :						Optional[Any]						=							coll_max + 1 - coll_min
    UpperCAmelCase__     :						Optional[int]						=							[0] * counting_arr_length

    # count how much a number appears in the collection
    for number in collection:
        counting_arr[number - coll_min] += 1

    # sum each position with it's predecessors. now, counting_arr[i] tells
    # us how many elements <= i has in the collection
    for i in range(1    ,   lowerCAmelCase__		):
        UpperCAmelCase__     :						str						=							counting_arr[i] + counting_arr[i - 1]

    # create the output collection
    UpperCAmelCase__     :						Tuple						=							[0] * coll_len

    # place the elements in the output, respecting the original order (stable
    # sort) from end to begin, updating counting_arr
    for i in reversed(range(0    ,   lowerCAmelCase__		)		):
        UpperCAmelCase__     :						List[Any]						=							collection[i]
        counting_arr[collection[i] - coll_min] -= 1

    return ordered





def    a__			(   lowerCAmelCase__		)       ->      Dict:
    return "".join([chr(lowerCAmelCase__		) for i in counting_sort([ord(lowerCAmelCase__		) for c in string]		)]		)


if __name__ == "__main__":
  # Test string sort
  assert counting_sort_string('''thisisthestring''') == "eghhiiinrsssttt"

  UpperCamelCase__          = input('''Enter numbers separated by a comma:\n''').strip()
  UpperCamelCase__          = [int(item) for item in user_input.split(''',''')]
  print(counting_sort(unsorted))


from .testing import (
    are_the_same_tensors,
    execute_subprocess_async,
    require_bnb,
    require_cpu,
    require_cuda,
    require_huggingface_suite,
    require_mps,
    require_multi_gpu,
    require_multi_xpu,
    require_safetensors,
    require_single_gpu,
    require_single_xpu,
    require_torch_min_version,
    require_tpu,
    require_xpu,
    skip,
    slow,
)
from .training import RegressionDataset, RegressionModel, RegressionModelaXPU


from .scripts import test_script, test_sync, test_ops  # isort: skip