from typing import Iterable
from typing import Mapping


def filter_ignored_params(data, ignored_params: Iterable[str]):
    """Remove any ignored params from an object, if it's dict-like"""
    if not isinstance(data, Mapping) or not ignored_params:
        return data
    return {k: v for k, v in data.items() if k not in ignored_params}