class_docstr: choice type parameter
      
class_docstr_tok: ["choice","type","parameter"]
code: def mutate(self):
      child = copy.deepcopy(self)
      while random.uniform(0, 1) < child.mutate_rate:
          idx = child.numbers.index(child.value)
          if idx == 0 and idx + 1 < len(child.numbers):
              child.value = child.numbers[idx + 1]
          elif idx + 1 == len(child.numbers) and idx - 1 >= 0:
              child.value = child.numbers[idx - 1]
          elif idx == 0 and idx + 1 == len(child.numbers):
              break
          else:
              shift = random.choice([-1, 1])
              child.value = child.numbers[idx + shift]
  
      return child
  
imports: import math
  import logging
  import copy
  import random
  import numpy
  from itertools import permutations, combinations
  import nni
  from nni.tuner import Tuner
label_desc: Use image node_id 4 for calling the Discrete obj's underlying member method code with example usage: obj.mutate() and returns: child