def METHOD_NAME(self, instance):
    if not self.is_active(instance.data):
        return
    ext_mapping = (
        instance.context.data["project_settings"]["maya"]["ext_mapping"]
    )
    if ext_mapping:
        self.log.debug("Looking in settings for scene type ...")
        # use extension mapping for first family found
        for family in self.families:
            try:
                self.scene_type = ext_mapping[family]
                self.log.debug(
                    "Using {} as scene type".format(self.scene_type))
                break
            except KeyError:
                # set scene type to ma
                self.scene_type = "ma"
    _scene_type = ("mayaAscii"
                   if self.scene_type == "ma"
                   else "mayaBinary")
    dir_path = self.staging_dir(instance)
    # named the file with imported reference
    if instance.name == "Main":
        return
    tmp_name = instance.name + self.tmp_format
    current_name = cmds.file(query=True, sceneName=True)
    ref_scene_name = "{0}.{1}".format(tmp_name, self.scene_type)
    reference_path = os.path.join(dir_path, ref_scene_name)
    tmp_path = os.path.dirname(current_name) + "/" + ref_scene_name
    self.log.debug("Performing extraction..")
    # This generates script for mayapy to take care of reference
    # importing outside current session. It is passing current scene
    # name and destination scene name.
    script = ("""