from unittest.mock import Mock


def _get_details(with_wait=False):
    """Return a details dict that conforms to what the backoff handlers expected

    Only the on_backoff handler will contain a 'wait' value
    """
    details = {'elapsed': 1.2345, 'tries': 3, 'target': Mock(__name__='func')}
    if with_wait:
        details['wait'] = 1.0
    return details