def exclude_keys(exclude, d):
    """
    Remove the `exclude` keys from a kwargs dict.

    Args:
      exclude: list or set of keys to be excluded
      d: raw dict that might have irrelevant keys
    """
    assert is_sequence(exclude)
    return {k: v for k, v in d.items() if k not in set(exclude)}

    Remove the `exclude` keys from a kwargs dict.

    Args:
      exclude: list or set of keys to be excluded
      d: raw dict that might have irrelevant keys
    
surreal/utils/common.py