<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_example_by_schema(cls, schema, ignored_schemas=None, paths=None, name=''):
 """ Get example by schema object :param Schema schema: current schema :param list ignored_schemas: list of previous schemas for avoid circular references :param list paths: list object paths (ex. #/definitions/Model.property) If nested schemas exists, custom examples checks in order from paths :param str name: name of property schema object if exists :return: dict or list (if schema is array) """

        if schema.schema_example:
            return schema.schema_example

        if ignored_schemas is None:
            ignored_schemas = []

        if paths is None:
            paths = []

        if name:
            paths = list(map(lambda path: '.'.join((path, name)), paths))

        if schema.ref_path:
            paths.append(schema.ref_path)

        if schema.schema_id in ignored_schemas:
            result = [] if schema.is_array else {}
        else:
            schemas = ignored_schemas + [schema.schema_id]
            kwargs = dict(
                ignored_schemas=schemas,
                paths=paths
            )
            if schema.is_array:
                result = cls.get_example_for_array(
                    schema.item, **kwargs)
            elif schema.type in PRIMITIVE_TYPES:
                result = cls.get_example_value_for_primitive_type(
                    schema.type, schema.raw, schema.type_format, paths=paths
                )
            elif schema.all_of:
                result = {}
                for _schema_id in schema.all_of:
                    schema = SchemaObjects.get(_schema_id)
                    result.update(cls.get_example_by_schema(schema, **kwargs))
            else:
                result = cls.get_example_for_object(
                    schema.properties, nested=schema.nested_schemas, **kwargs)
        return result