//  [python]
def process_dataset(self, parsed_context, parsed_example):
        num_nodes = tf.cast(parsed_context['num_nodes'], dtype=tf.int32)
        package = parsed_context['package']  # (, )
        exe_name = parsed_context['exe_name']  # (, )

        target_strings = parsed_example['targets']
        target_strings = target_strings[:self.config.TARGET_MAX_PARTS]  # (target, )
        target_id = self.target_table.lookup(tf.concat([target_strings, [common.blank_target_padding]], axis=-1))
        target_id = tf.cast(target_id, tf.int32)  # (target + 1, )

        target_length = tf.shape(target_id)[0]

        edges = parsed_example['edges']
        adj_matrix = tf.scatter_nd(indices=edges, updates=tf.ones(tf.shape(edges)[0], dtype=tf.float32),
                                   shape=[num_nodes, num_nodes])  # (n, n)

        node_strings = parsed_example['node_strings']
        api_max_name_parts = self.config.API_MAX_NAME_PARTS
        sparse_api_strings = tf.sparse.SparseTensor(
            indices=node_strings.indices, values=node_strings.values,
            dense_shape=[node_strings.dense_shape[0], tf.maximum(node_strings.dense_shape[1],
                                                                 api_max_name_parts) + 1])  # (n, api_max_parts)
        dense_api_strings = tf.sparse.to_dense(sp_input=sparse_api_strings,
                                               default_value=common.blank_target_padding)  # (n, api_max_name_parts)
        clipped_api_strings = dense_api_strings[:, :api_max_name_parts]  # (n, api_max_name_parts)
        api_id = self.api_table.lookup(clipped_api_strings)

        api_index_of_blank = tf.where(tf.equal(dense_api_strings, common.blank_target_padding))
        api_lengths = tf.segment_min(data=api_index_of_blank[:, 1], segment_ids=api_index_of_blank[:, 0])
        clipped_api_lengths = tf.clip_by_value(tf.cast(api_lengths, dtype=tf.int32), clip_value_min=0,
                                               clip_value_max=api_max_name_parts)

        arg_strings = parsed_example['arg_strings']
        max_args = self.config.ARGS_MAX_LEN
        sparse_arg_strings = tf.sparse.SparseTensor(
            indices=arg_strings.indices, values=arg_strings.values,
            dense_shape=[arg_strings.dense_shape[0], tf.maximum(arg_strings.dense_shape[1],
                                                                max_args) + 1])
        dense_arg_strings = tf.sparse.to_dense(sp_input=sparse_arg_strings, default_value=common.blank_target_padding)
        clipped_arg_strings = dense_arg_strings[:, :max_args]
        arg_id = self.arg_table.lookup(clipped_arg_strings)

        arg_index_of_blank = tf.where(tf.equal(dense_arg_strings, common.blank_target_padding))
        arg_lengths = tf.segment_min(data=arg_index_of_blank[:, 1], segment_ids=arg_index_of_blank[:, 0])
        clipped_arg_lengths = tf.clip_by_value(tf.cast(arg_lengths, dtype=tf.int32), clip_value_min=0,
                                               clip_value_max=max_args)

        return {PACKAGE: package,
                EXE_NAME: exe_name,
                TARGET_NAME_LABELS: target_strings,
                TARGET_NAME_IDS: target_id,
                TARGET_NAME_LENGTHS: target_length,
                API_INDICES: api_id,
                API_LENGTHS: clipped_api_lengths,
                KIND_INDICES: arg_id,
                KIND_LENGTHS: clipped_arg_lengths,
                NUM_NODES_KEY: num_nodes,
                ADJ_MATRIX: adj_matrix,
                }