def parse_darknet_ann_str_to_list(annotations):
annotations = annotations.split("<STR_LIT:\n>")<EOL>ann = []<EOL>for a in annotations:<EOL><INDENT>a = a.split()<EOL>if len(a) == <NUM_LIT:5>:<EOL><INDENT>for i, _v in enumerate(a):<EOL><INDENT>if i == <NUM_LIT:0>:<EOL><INDENT>a[i] = int(a[i])<EOL><DEDENT>else:<EOL><INDENT>a[i] = float(a[i])<EOL><DEDENT><DEDENT>ann.append(a)<EOL><DEDENT><DEDENT>return ann<EOL>
r"""Input string format of class, x, y, w, h, return list of list format.

    Parameters
    -----------
    annotations : str
        The annotations in darkent format "class, x, y, w, h ...." seperated by "\\n".

    Returns
    -------
    list of list of 4 numbers
        List of bounding box.