def repr_object(o):
    """
    Represent an object for testing purposes.

    Parameters
    ----------
    o
        Object to represent.

    Returns
    -------
    result : str
        The representation.
    """
    if isinstance(o, (str, bytes, int, float, type)) or o is None:
        return repr(o)
    return "!" + str(type(o))