def copy_as_new(dictionary, fields):
    """
    Copies the dictionary to a new one. Copies only the fields specified.
    :param dictionary:
    :param fields:
    :return:
    """
    out = {}
    for f in fields:
        out[f] = dictionary[f]
    return out