<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_columns(model=None, fields=None, meta=None):

 """
 Get model columns list
 """

    if model:
        M = get_model(model)
    else:
        M = None
    if fields is not None:
        f = fields

    if M:
        if meta and hasattr(M, meta):
            m = getattr(model, meta)
            if hasattr(m, 'fields'):
                f = m.fields
            else:
                f = M._fields_list
        else:
            f = M._fields_list

    columns = []
    for x in f:
        if isinstance(x, str):  # so x is field_name
            field_name = x
        elif isinstance(x, dict):
            field_name = x['name']
        else:
            raise UliwebError("Field definition is not right, it should be just like str or {'name':xxx}")

        if '.' in field_name:
            model_name, field_name = field_name.split('.')
            M = get_model(model_name)

        if not M:
            raise UliwebError("Model can't be empty, because field name not has `model.` prefix")

        if field_name in M.c:
            columns.append(M.c[field_name])

    return columns