<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def lookup(source_id: str, schema_id: str):
 """ Create a new schema object from an existing ledger schema :param source_id: Institution's personal identification for the schema :param schema_id: Ledger schema ID for lookup Example: source_id = 'foobar123' name = 'Address Schema' version = '1.0' attrs = ['address', 'city', 'state'] payment_handle = 0 schema1 = await Schema.create(source_id, name, version, attrs, payment_handle) id1 = await schema.get_schema_id() data = await Schema.lookup(source_id, schema_id) assert data.attrs.sort() == ['sex', 'age', 'name', 'height'].sort() assert data.name == 'test-licence' assert data.handle > 0 :return: schema object """

        try:
            schema = Schema(source_id, '', '', [])

            if not hasattr(Schema.lookup, "cb"):
                schema.logger.debug("vcx_schema_get_attributes: Creating callback")
                Schema.lookup.cb = create_cb(CFUNCTYPE(None, c_uint32, c_uint32, c_uint32, c_char_p))

            c_source_id = c_char_p(source_id.encode('utf-8'))
            c_schema_id = c_char_p(schema_id.encode('utf-8'))

            handle, data = await do_call('vcx_schema_get_attributes',
                                         c_source_id,
                                         c_schema_id,
                                         Schema.lookup.cb)
            schema.logger.debug("created schema object")

            schema_result = json.loads(data.decode())
            schema.attrs = schema_result['data']
            schema.name = schema_result['name']
            schema.version = schema_result['version']
            schema.handle = handle
            return schema
        except KeyError:
            raise VcxError(ErrorCode.InvalidSchema)