code: def register(self, schema):
          
          result = None
  
          uuid = schema.uuid
  
          if uuid in self._schbyuuid:
              result = self._schbyuuid[uuid]
  
          if result != schema:
  
              self._schbyuuid[uuid] = schema
  
              name = schema.name
  
              schemas = self._schbyname.setdefault(name, set())
  
              schemas.add(schema)
  
              for innername, innerschema in iteritems(schema.getschemas()):
  
                  if innerschema.uuid not in self._schbyuuid:
                      register(innerschema)
  
          return result
docs: Register input schema class.
  
          When registering a schema, all inner schemas are registered as well.
  
          :param Schema schema: schema to register.
          :return: old registered schema.
          :rtype: type