class_docstr: Factory for instantiating SDR classifiers.
docstr: :param proto: SDRClassifierRegionProto capnproto object
docstr_tok: [":","param","proto",":","SDRClassifierRegionProto","capnproto","object"]
code: def read(proto):
      """
      :param proto: SDRClassifierRegionProto capnproto object
      """
      impl = proto.implementation
      if impl == "py":
          return SDRClassifier.read(proto.sdrClassifier)
      elif impl == "cpp":
          return FastSDRClassifier.read(proto.sdrClassifier)
      elif impl == "diff":
          return SDRClassifierDiff.read(proto.sdrClassifier)
      else:
          raise ValueError(
              "Invalid classifier implementation (%r). Value must be "
              '"py", "cpp" or "diff".' % impl
          )
  
file_path: nupic-legacy/src/nupic/algorithms/sdr_classifier_factory.py
imports: from nupic.algorithms.sdr_classifier import SDRClassifier
  from nupic.algorithms.sdr_classifier_diff import SDRClassifierDiff
  from nupic.bindings.algorithms import SDRClassifier
  from nupic.support.configuration import Configuration
label_desc: Use image node_id 2 for calling the SDRClassifierFactory obj's underlying member method code with example usage: obj.read(proto) and returns: SDRClassifier, FastSDRClassifier, SDRClassifierDiff