def dict_clean_others(d: dict, use: tuple):
    """
    Use values from `d` when the key exists in `d` and transfer them to a new dict.
    Only keys listed in `use` will be in the new dict which will be returned by this function.
    If a key listed in `use` is not included in `d`, it will be skipped and is not included in the new dict.

    :param d: dict: Dictionary to clean
    :param use: tuple: List of keys that will be transfered to the new dict.
                Alternatively if the key should be changed in the new returned dict,
                a tuple containing ('oldkey', 'newkey') can be passed.

    Example:
    d = {
        'firstkey': 'firstvalue',
        'second': 2,
        'third': None,
        'otherkey': 'hackyvalue',
    }

    dict_clean_others(d, ('firstkey', 'second', 'third', 'otherkey'))
    => {
        'firstkey': 'firstvalue',
        'second': 2,
        'third': None,
    }
    """
    values = {}
    for key in use:
        try:
            if isinstance(key, tuple):
                o_key, v_key = key
            else:
                v_key = o_key = key
            values[v_key] = d[o_key]
        except KeyError:
            pass
    return values
