<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def search(search, **kwargs):
 """ Search for models whose names matches the given pattern. Print the results to stdout. .. deprecated :: 1.0.0 `search` will be moved to ``andeshelp`` in future versions. Parameters search : str Partial or full name of the model to search for kwargs : dict Other keyword arguments. Returns ------- list The list of model names that match the given pattern. """


    from .models import all_models
    out = []

    if not search:
        return out

    keys = sorted(list(all_models.keys()))

    for key in keys:
        vals = all_models[key]
        val = list(vals.keys())
        val = sorted(val)

        for item in val:
            if search.lower() in item.lower():
                out.append(key + '.' + item)

    if out:
        print('Search result: <file.model> containing <{}>'
              .format(search))
        print(' '.join(out))
    else:
        print('No model containing <{:s}> found'.format(search))

    return out