from typing import Mapping


def is_mappy(x):
    """
    Return True if `x` is "mappy", i.e. a map-like object.

    "Mappy" is defined as any instance of `collections.Mapping`:

    >>> is_mappy({'a': 'b'})
    True
    >>> from collections import defaultdict
    >>> is_mappy(defaultdict(list))
    True
    >>> is_mappy('a regular string')
    False
    >>> is_mappy(['a', 'b'])
    False
    >>> is_listy(iter({'a': 'b'}))
    False

    Note:
        Iterables and generators fail the "mappy" test.

    Args:
        x (any value): The object to test.

    Returns:
        bool: True if `x` is "mappy", False otherwise.

    """
    return isinstance(x, Mapping)