class_docstr: Confusion Matrix metric compatible with Weights and Biases logger.
  Differently from the `StreamConfusionMatrix`, this metric will use W&B
  built-in functionalities to log the Confusion Matrix.
  
  This metric may not produce meaningful outputs with other loggers.
  
  https://docs.wandb.ai/guides/track/log#custom-charts
class_docstr_tok: ["Confusion","Matrix","metric","compatible","with","Weights","and","Biases","logger",".","Differently","from","the","`","StreamConfusionMatrix","`",",","this","metric","will","use","W","&","B","built-in","functionalities","to","log","the","Confusion","Matrix",".","This","metric","may","not","produce","meaningful","outputs","with","other","loggers",".","https",":","\/\/docs.wandb.ai\/guides\/track\/log","#","custom-charts"]
code: def result(self):
      outputs = torch.cat(self.outputs, dim=0)
      targets = torch.cat(self.targets, dim=0)
      return outputs, targets
  
imports: from matplotlib.figure import Figure
  from numpy import arange
  from typing_extensions import Literal
  from typing import Any, Callable, Iterable, Union, Optional, TYPE_CHECKING, List
  import wandb
  import numpy
  import torch
  from PIL.Image import Image
  from torch import Tensor
  from torch.nn.functional import pad
  from avalanche.benchmarks import NCScenario
  from avalanche.evaluation import PluginMetric, Metric
  from avalanche.evaluation.metric_results import AlternativeValues, MetricValue, MetricResult
  from avalanche.evaluation.metric_utils import default_cm_image_creator, phase_and_task, stream_type
label_desc: Use image node_id 4 for calling the WandBStreamConfusionMatrix obj's underlying member method code with example usage: obj.result() and returns: outputs,  targets