code: def custom_schema_test(self):
      def encode_and_decode(schema_definition):
          avro_schema = AvroSchema(
              None, schema_definition=schema_definition
          )
  
          company = {
              "name": "company-name",
              "address": "xxx road xxx street",
              "employees": [
                  {"name": "user1", "age": 25},
                  {"name": "user2", "age": 30},
                  {"name": "user3", "age": 35},
              ],
              "labels": {
                  "industry": "software",
                  "scale": ">100",
                  "funds": "1000000.0",
              },
              "companyType": "companyType1",
          }
          data = avro_schema.encode(company)
          company_decode = avro_schema.decode(data)
          self.assertEqual(company, company_decode)
  
      schema_definition = {
          "doc": "this is doc",
          "namespace": "example.avro",
          "type": "record",
          "name": "Company",
          "fields": [
              {"name": "name", "type": ["null", "string"]},
              {"name": "address", "type": ["null", "string"]},
              {
                  "name": "employees",
                  "type": [
                      "null",
                      {
                          "type": "array",
                          "items": {
                              "type": "record",
                              "name": "Employee",
                              "fields": [
                                  {
                                      "name": "name",
                                      "type": ["null", "string"],
                                  },
                                  {
                                      "name": "age",
                                      "type": ["null", "int"],
                                  },
                              ],
                          },
                      },
                  ],
              },
              {
                  "name": "labels",
                  "type": ["null", {"type": "map", "values": "string"}],
              },
              {
                  "name": "companyType",
                  "type": [
                      "null",
                      {
                          "type": "enum",
                          "name": "CompanyType",
                          "symbols": [
                              "companyType1",
                              "companyType2",
                              "companyType3",
                          ],
                      },
                  ],
              },
          ],
      }
      encode_and_decode(schema_definition)
      # Users could load schema from file by `fastavro.schema`
      # Or use `avro.schema` like this `avro.schema.parse(open("examples/company.avsc", "rb").read()).to_json()`
      encode_and_decode(load_schema("examples/company.avsc"))
  
imports: import math
  import logging
  import requests
  from typing import List
  from unittest import TestCase, main
  import fastavro
  import pulsar
  from pulsar.schema import *
  from enum import Enum
  import json
  from fastavro.schema import load_schema
label_desc: Use image node_id 29 for calling the SchemaTest obj's underlying member method code with example usage: obj.custom_schema_test() without return types