<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register(self, schema):
 """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 """

        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