def METHOD_NAME(self, nodes, attribute_data, kwargs):
    self.log.debug(
        "Writing {} with:\n{}".format(kwargs["filename"], kwargs)
    )
    filenames = []
    nodes_by_id = defaultdict(list)
    # Duplicating nodes so they are direct children of the world. This
    # makes the hierarchy of any exported ass file the same.
    with lib.delete_after() as delete_bin:
        duplicate_nodes = []
        for node in nodes:
            # Only interested in transforms:
            if cmds.nodeType(node) != "transform":
                continue
            # Only interested in transforms with shapes.
            shapes = cmds.listRelatives(
                node, shapes=True, noIntermediate=True
            )
            if not shapes:
                continue
            duplicate_transform = cmds.duplicate(node)[0]
            if cmds.listRelatives(duplicate_transform, parent=True):
                duplicate_transform = cmds.parent(
                    duplicate_transform, world=True
                )[0]
            basename = node.rsplit("|", 1)[-1].rsplit(":", 1)[-1]
            duplicate_transform = cmds.rename(
                duplicate_transform, basename
            )
            # Discard children nodes that are not shapes
            shapes = cmds.listRelatives(
                duplicate_transform, shapes=True, fullPath=True
            )
            children = cmds.listRelatives(
                duplicate_transform, children=True, fullPath=True
            )
            cmds.delete(set(children) - set(shapes))
            duplicate_nodes.append(duplicate_transform)
            duplicate_nodes.extend(shapes)
            delete_bin.append(duplicate_transform)
        # Copy cbId to mtoa_constant.
        for node in duplicate_nodes:
            # Converting Maya hierarchy separator "|" to Arnold
            # separator "/".
            nodes_by_id[lib.get_id(node)].append(node.replace("|", "/"))
        with lib.attribute_values(attribute_data):
            with lib.maintained_selection():
                self.log.debug(
                    "Writing: {}".format(duplicate_nodes)
                )
                cmds.select(duplicate_nodes, noExpand=True)
                self.log.debug(
                    "Extracting ass sequence with: {}".format(kwargs)
                )
                exported_files = cmds.arnoldExportAss(**kwargs)
                for file in exported_files:
                    filenames.append(os.path.split(file)[1])
                self.log.debug("Exported: {}".format(filenames))
    return filenames, nodes_by_id