class_docstr: Custom unpickler to handle moved classes and optional libraries.
class_docstr_tok: ["Custom","unpickler","to","handle","moved","classes","and","optional","libraries","."]
code: def find_class(self, module, name):
      try:
          return super().find_class(module, name)
      except (ModuleNotFoundError, AttributeError):
          if module.startswith("apex."):
              # user doesn't have apex installed. We'll deal with this later.
              return FakeAPEXClass
          else:
              if (
                  module == "parlai.core.utils"
                  or module == "parlai.utils.misc"
              ) and name == "Opt":
                  from parlai.core.opt import Opt
  
                  return Opt
              if module == "parlai.core.dict" and name == "_BPEHelper":
                  from parlai.utils.bpe import (
                      SubwordBPEHelper as _BPEHelper,
                  )
  
                  return _BPEHelper
  
              raise
  
imports: import pickle
label_desc: Use image node_id 1 for calling the Unpickler obj's underlying member method code with example usage: obj.find_class(module, name) and returns: super, FakeAPEXClass, Opt, _BPEHelper