class_docstr: Defines a sample from the optimisation domain.
  
  It has the same recursive structure a :class:`Domain` object, however each
  dimension is represented by one value only. The keys are exactly as the
  keys of the respective domain.
  
  Examples:
      >>> domain = Domain({"x": {"y": {0, 1, 2}}, "z": [3, 4]})
      >>> domain.sample()
      {'x': {'y': 0}, 'z': 3.1415926535897932}
class_docstr_tok: ["Defines","a","sample","from","the","optimisation","domain",".","It","has","the","same","recursive","structure","a",":","class",":","`","Domain","`","object",",","however","each","dimension","is","represented","by","one","value","only",".","The","keys","are","exactly","as","the","keys","of","the","respective","domain",".","Examples",":",">",">",">","domain","=","Domain","(","{","``","x","''",":","{","``","y","''",":","{","0",",","1",",","2","}","}",",","``","z","''",":","[","3",",","4","]","}",")",">",">",">","domain.sample","(",")","{","'","x","'",":","{","'","y","'",":","0","}",",","'","z","'",":","3.1415926535897932","}"]
docstr: Iterate over all values in the sample.
  
  Yields:
      A tuple of keys and a single value, where the keys are a tuple
      of strings.
docstr_tok: ["Iterate","over","all","values","in","the","sample",".","Yields",":","A","tuple","of","keys","and","a","single","value",",","where","the","keys","are","a","tuple","of","strings","."]
code: def __iter__(self):
      """Iterate over all values in the sample.
  
      Yields:
          A tuple of keys and a single value, where the keys are a tuple
          of strings.
      """
      yield from self.flatten().items()
  
imports: import ast
  import copy
  import os
  import pickle
  import random
  from collections import namedtuple
  from typing import Tuple
label_desc: Use image node_id 2 for calling the Sample obj's underlying member method code with example usage: obj.__iter__() without return types