GET /schemas/ids/{int: id}
        Retrieve a parsed avro schema by id or None if not found
        :param int schema_id: int value
        :returns: Avro schema
        :rtype: schema
550763
def get_by_id(self, schema_id):
        
        if schema_id in self.id_to_schema:
            return self.id_to_schema[schema_id]
        # fetch from the registry
        url = '/'.join([self.url, 'schemas', 'ids', str(schema_id)])

        result, code = self._send_request(url)
        if code == 404:
            log.error("Schema not found:" + str(code))
            return None
        elif not (code >= 200 and code <= 299):
            log.error("Unable to get schema for the specific ID:" + str(code))
            return None
        else:
            # need to parse the schema
            schema_str = result.get("schema")
            try:
                result = loads(schema_str)
                # cache it
                self._cache_schema(result, schema_id)
                return result
            except ClientError as e:
                # bad schema - should not happen
                raise ClientError("Received bad schema (id %s) from registry: %s" % (schema_id, e))
692009
def getSchema(cls):
        
        schema = []
        for name, atr in cls.__attributes__:
            atr = atr.__get__(None, cls)
            if isinstance(atr, SQLAttribute):
                schema.append((name, atr))
        cls.getSchema = staticmethod(lambda schema=schema: schema)
        return schema
921676
def single_stats(self, id): # pylint: disable=invalid-name,redefined-builtin
        
        schema = SingleStatsSchema()
        resp = self.service.get(self.base+str(id)+'/', params={'stats': 'all'})
        return self.service.decode(schema, resp)
869179
def get_unique_schema_id(schema):
    # type: (GraphQLSchema) -> str
    """"""
    assert isinstance(schema, GraphQLSchema), (
        "Must receive a GraphQLSchema as schema. Received {}"
    ).format(repr(schema))

    if schema not in _cached_schemas:
        _cached_schemas[schema] = sha1(str(schema).encode("utf-8")).hexdigest()
    return _cached_schemas[schema]
439408
def schemaParse(self):
        
        ret = libxml2mod.xmlSchemaParse(self._o)
        if ret is None:raise parserError('xmlSchemaParse() failed')
        __tmp = Schema(_obj=ret)
        return __tmp
418951
def getRnaQuantificationSet(self, id_):
        
        if id_ not in self._rnaQuantificationSetIdMap:
            raise exceptions.RnaQuantificationSetNotFoundException(id_)
        return self._rnaQuantificationSetIdMap[id_]
573532
def get(self, schema, query=None, **kwargs):
        
        ret = self._get_query(self._get, schema, query, **kwargs)
        if not ret: ret = []
        return ret
131934
def get_schema(repo, content_type):
    
    try:
        with open(
                os.path.join(repo.working_dir,
                             '_schemas',
                             '%s.avsc' % (content_type,)), 'r') as fp:
            data = fp.read()
            return avro.schema.parse(data)
    except IOError:  # pragma: no cover
        raise NotFound('Schema does not exist.')
85353
def get_yaml_schema(self):
        
        response = self._send(http_method='GET',
                              location_id='1f9990b9-1dba-441f-9c2e-6485888c42b6',
                              version='5.1-preview.1')
        return self._deserialize('object', response)
1299401
def get_schema(self, alias):
        
        if isinstance(alias, dict):
            return alias
        uri = self.get_uri(alias)
        if uri is None:
            raise GraphException('No such schema: %r' % alias)
        uri, schema = self.resolver.resolve(uri)
        return schema
311865
def schema(self):
        
        if not self.__schema:
            # Inherit context from parent.
            context = getattr(self.parent, 'context', {})
            if isinstance(self.nested, SchemaABC):
                self.__schema = self.nested
                self.__schema.context.update(context)
            else:
                if isinstance(self.nested, type) and issubclass(self.nested, SchemaABC):
                    schema_class = self.nested
                elif not isinstance(self.nested, basestring):
                    raise ValueError(
                        'Nested fields must be passed a '
                        'Schema, not {}.'.format(self.nested.__class__),
                    )
                elif self.nested == 'self':
                    schema_class = self.parent.__class__
                else:
                    schema_class = class_registry.get_class(self.nested)
                self.__schema = schema_class(
                    many=self.many,
                    only=self.only,
                    exclude=self.exclude,
                    context=context,
                    load_only=self._nested_normalized_option('load_only'),
                    dump_only=self._nested_normalized_option('dump_only'),
                )
        return self.__schema
321760
def connect(self, id): # pylint: disable=invalid-name,redefined-builtin
        
        schema = ConnectionSchema()
        resp = self.service.post(self.base+str(id)+'/connect/')
        return self.service.decode(schema, resp)
808472
def get_schema_from_type(resource_type):
    
    for cls_name, cls in class_registry._registry.items():
        try:
            if cls[0].opts.type_ == resource_type:
                return cls[0]
        except Exception:
            pass

    raise Exception("Couldn't find schema for type: {}".format(resource_type))
431774
private Path getOrGenerateSchemaFile(Schema schema) throws IOException {

    Preconditions.checkNotNull(schema, "Avro Schema should not be null");

    String hashedSchema = Hashing.sha256().hashString(schema.toString(), StandardCharsets.UTF_8).toString();

    if (!this.schemaPaths.containsKey(hashedSchema)) {

      Path schemaFilePath = new Path(this.schemaDir, String.valueOf(System.currentTimeMillis() + ".avsc"));
      AvroUtils.writeSchemaToFile(schema, schemaFilePath, fs, true);

      this.schemaPaths.put(hashedSchema, schemaFilePath);
    }

    return this.schemaPaths.get(hashedSchema);
  }
776390
def get_schematron(sct_path):
    
    sct_path = _get_file_path(sct_path)
    parser = etree.XMLParser(remove_blank_text=True)
    sct_doc = etree.parse(sct_path, parser=parser)
    return isoschematron.Schematron(sct_doc, store_report=True)
825780
def from_schema(cls, schema, id_of=_id_of, *args, **kwargs):
        

        return cls(base_uri=id_of(schema), referrer=schema, *args, **kwargs)
1120630
def _get_input_schema(self):
        """"""
        assert avro, 'avro module required'

        input_target = flatten(self.input())[0]
        input_fs = input_target.fs if hasattr(input_target, 'fs') else GCSClient()
        input_uri = self.source_uris()[0]
        if '*' in input_uri:
            file_uris = list(input_fs.list_wildcard(input_uri))
            if file_uris:
                input_uri = file_uris[0]
            else:
                raise RuntimeError('No match for ' + input_uri)

        schema = []
        exception_reading_schema = []

        def read_schema(fp):
            # fp contains the file part downloaded thus far. We rely on that the DataFileReader
            # initializes itself fine as soon as the file header with schema is downloaded, without
            # requiring the remainder of the file...
            try:
                reader = avro.datafile.DataFileReader(fp, avro.io.DatumReader())
                schema[:] = [reader.datum_reader.writers_schema]
            except Exception as e:
                # Save but assume benign unless schema reading ultimately fails. The benign
                # exception in case of insufficiently big downloaded file part seems to be:
                # TypeError('ord() expected a character, but string of length 0 found',).
                exception_reading_schema[:] = [e]
                return False
            return True

        input_fs.download(input_uri, 64 * 1024, read_schema).close()
        if not schema:
            raise exception_reading_schema[0]
        return schema[0]