code: def complete_tags(arg):
      
      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
docs: Complete NIPAP prefix type