def get_example_from_prop_spec(self, prop_spec, from_allof=False):
        """Return an example value from a property specification.

        Args:
            prop_spec: the specification of the property.
            from_allof: whether these properties are part of an
                        allOf section

        Returns:
            An example value
        """
        # Read example directly from (X-)Example or Default value
        easy_keys = ['example', 'x-example', 'default']
        for key in easy_keys:
            if key in prop_spec.keys() and self.use_example:
                return prop_spec[key]
        # Enum
        if 'enum' in prop_spec.keys():
            return prop_spec['enum'][0]
        # From definition
        if '$ref' in prop_spec.keys():
            return self._example_from_definition(prop_spec)
        # Process AllOf section
        if 'allOf' in prop_spec.keys():
            return self._example_from_allof(prop_spec)
        # Complex type
        if 'type' not in prop_spec:
            return self._example_from_complex_def(prop_spec)
        # Object - read from properties, without references
        if prop_spec['type'] == 'object':
            example, additional_properties = self._get_example_from_properties(prop_spec)
            if additional_properties or from_allof:
                return example
            return [example]
        # Array
        if prop_spec['type'] == 'array' or (isinstance(prop_spec['type'], list) and prop_spec['type'][0] == 'array'):
            return self._example_from_array_spec(prop_spec)
        # File
        if prop_spec['type'] == 'file':
            return (StringIO('my file contents'), 'hello world.txt')
        # Date time
        if 'format' in prop_spec.keys() and prop_spec['format'] == 'date-time':
            return self._get_example_from_basic_type('datetime')[0]
        # List
        if isinstance(prop_spec['type'], list):
            return self._get_example_from_basic_type(prop_spec['type'][0])[0]

        # Default - basic type
        logging.info("falling back to basic type, no other match found")
        return self._get_example_from_basic_type(prop_spec['type'])[0]
Return an example value from a property specification.

        Args:
            prop_spec: the specification of the property.
            from_allof: whether these properties are part of an
                        allOf section

        Returns:
            An example value