<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def list_vrf(arg, opts, shell_opts):
 """ List VRFs matching a search criteria """


    search_string = ''
    if type(arg) == list or type(arg) == tuple:
        search_string = ' '.join(arg)

    offset = 0
    limit = 100
    while True:
        res = VRF.smart_search(search_string, { 'offset': offset, 'max_result': limit })
        if offset == 0:
            if shell_opts.show_interpretation:
                print("Query interpretation:")
                _parse_interp_vrf(res['interpretation'])

            if res['error']:
                print("Query failed: %s" % res['error_message'])
                return

            if len(res['result']) == 0:
                print("No VRFs matching '%s' found." % search_string)
                return

            print("%-16s %-22s %-2s %-40s" % ("VRF RT", "Name", "#", "Description"))
            print("--------------------------------------------------------------------------------")

        for v in res['result']:
            tags = '-'
            if len(v.tags) > 0:
                tags = '#%d' % len(v.tags)
            if len(str(v.description)) > 100:
                desc = v.description[0:97] + "..."
            else:
                desc = v.description
            print("%-16s %-22s %-2s %-40s" % (v.rt or '-', v.name, tags, desc))

        if len(res['result']) < limit:
            break
        offset += limit