<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def complete_tags(arg):
 """ Complete NIPAP prefix type """

    search_string = '^'
    if arg is not None:
        search_string += arg

    res = Tag.search({
        'operator': 'regex_match',
        'val1': 'name',
        'val2': search_string
    })

    ret = []
    for t in res['result']:
        ret.append(t.name)

    return ret