<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _generate_arg_types(coordlist_length, shape_name):
 """Find coordinate types based on shape name and coordlist length This function returns a list of coordinate types based on which coordinates can be repeated for a given type of shap Parameters coordlist_length : int The number of coordinates or arguments used to define the shape. shape_name : str One of the names in `pyregion.ds9_shape_defs`. Returns ------- arg_types : list A list of objects from `pyregion.region_numbers` with a length equal to coordlist_length. """

    from .ds9_region_parser import ds9_shape_defs
    from .ds9_attr_parser import ds9_shape_in_comment_defs

    if shape_name in ds9_shape_defs:
        shape_def = ds9_shape_defs[shape_name]
    else:
        shape_def = ds9_shape_in_comment_defs[shape_name]

    initial_arg_types = shape_def.args_list
    arg_repeats = shape_def.args_repeat

    if arg_repeats is None:
        return initial_arg_types

    # repeat args between n1 and n2
    n1, n2 = arg_repeats
    arg_types = list(initial_arg_types[:n1])
    num_of_repeats = coordlist_length - (len(initial_arg_types) - n2)
    arg_types.extend((num_of_repeats - n1) //
                     (n2 - n1) * initial_arg_types[n1:n2])
    arg_types.extend(initial_arg_types[n2:])
    return arg_types