def get_params(kwargs, valid_params):
    """
    Filter valid_params from kwargs and return as dict
    """
    params = {}
    for field in valid_params:
        if field in kwargs:
            params[field] = kwargs.get(field)
    return params