code: def get_concept_scheme(rdf):
      
      # add explicit type
      for s, o in rdf.subject_objects(SKOS.inScheme):
          if not isinstance(o, Literal):
              rdf.add((o, RDF.type, SKOS.ConceptScheme))
          else:
              logging.warning(
                  "Literal value %s for skos:inScheme detected, ignoring.", o)
      css = list(rdf.subjects(RDF.type, SKOS.ConceptScheme))
      if len(css) > 1:
          css.sort()
          cs = css[0]
          logging.warning(
              "Multiple concept schemes found. "
              "Selecting %s as default concept scheme.", cs)
      elif len(css) == 1:
          cs = css[0]
      else:
          cs = None
  
      return cs
docs: Return a skos:ConceptScheme contained in the model.
  
      Returns None if no skos:ConceptScheme is present.