def filter_kwargs(keywords, **kwargs):
    """
    Filter provided keyword arguments and remove all but
    those matching a provided list of relevant keywords.

    Parameters
    ----------
    keywords : list of string
      Keywords to search for within the provided keyword arguments
    kwargs : dict
      Dictionary of provided keywords

    Returns
    ----------
    filtered_kwargs : dict
      Keyword arguments matching provided keyword list entries
    """

    # Create an empty dictionary for keyword matches
    filtered_kwargs = dict()

    # Loop through relevant keywords
    for key in keywords:
        # Check if there is a match
        if key in kwargs:
            # Add the keyword argument to the matches dictionary
            filtered_kwargs[key] = kwargs[key]

    return filtered_kwargs