def METHOD_NAME(self, data, metadata=None):
    """Validate the display data.
    Parameters
    ----------
    data : dict
        The formata data dictionary.
    metadata : dict
        Any metadata for the data.
    """
    if not isinstance(data, dict):
        raise TypeError('data must be a dict, got: %r' % data)
    if metadata is not None:
        if not isinstance(metadata, dict):
            raise TypeError('metadata must be a dict, got: %r' % data)