<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _definition_from_example(example):
 """Generates a swagger definition json from a given example Works only for simple types in the dict Args: example: The example for which we want a definition Type is DICT Returns: A dict that is the swagger definition json """

        assert isinstance(example, dict)

        def _has_simple_type(value):
            accepted = (str, int, float, bool)
            return isinstance(value, accepted)

        definition = {
            'type': 'object',
            'properties': {},
        }
        for key, value in example.items():
            if not _has_simple_type(value):
                raise Exception("Not implemented yet")
            ret_value = None
            if isinstance(value, str):
                ret_value = {'type': 'string'}
            elif isinstance(value, int):
                ret_value = {'type': 'integer', 'format': 'int64'}
            elif isinstance(value, float):
                ret_value = {'type': 'number', 'format': 'double'}
            elif isinstance(value, bool):
                ret_value = {'type': 'boolean'}
            else:
                raise Exception("Not implemented yet")
            definition['properties'][key] = ret_value

        return definition