docstr: Returns the mean and variance of all instances as features.
docstr_tok: ["Returns","the","mean","and","variance","of","all","instances","as","features","."]
code: def get_instance_features(
      self, n: int = 45
  ) -> dict[str, list[int | float]]:
      """Returns the mean and variance of all instances as features."""
      features = {}
      for instance in self.get_instances(n):
          data, _ = self.get_instance_data(instance)
          features[instance] = [np.mean(data), np.var(data)]
  
      return features
  
file_path: SMAC3/tests/fixtures/datasets.py
imports: from __future__ import annotations
  from abc import abstractmethod
  import itertools
  import numpy
  import pytest
  from sklearn import datasets
label_desc: Use image node_id 3 for calling the DigitsDataset obj's underlying member method code with example usage: obj.get_instance_features(n) and returns: features