class_docstr: factor type parameter
      
class_docstr_tok: ["factor","type","parameter"]
code: def _get_all_partitions(self, product, num):
      # get all prime factors with repetition
      prime_factors = self._get_prime_factors(product)
  
      # group all prime factors
      groups = {}
      for prime_factor in prime_factors:
          if prime_factor in groups.keys():
              groups[prime_factor] += 1
          else:
              groups[prime_factor] = 1
  
      # partition each group
      for key, value in groups.items():
          partitions = []
          for comb in combinations(range(value + num - 1), num - 1):
              # print(comb)
              partition = []
              start_idx = -1
              for idx in comb:
                  partition.append(key ** (idx - start_idx - 1))
                  start_idx = idx
              partition.append(key ** (value + num - 2 - start_idx))
              partitions.append(partition)
          groups[key] = partitions
  
      # generate partitions
      partitions = []
  
      def part(groups, mul=[]):
          if not groups:
              partition = [1] * num
              for i in range(num):
                  for m in mul:
                      partition[i] *= m[i]
              partitions.append(partition)
  
          for key, group in groups.items():
              for partition in group:
                  mul.append(partition)
                  tmp = copy.deepcopy(groups)
                  del tmp[key]
                  part(tmp, mul)
                  mul.pop()
              break
  
      part(groups)
      return partitions
  
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 9 for calling the Factor obj's underlying member method code with example usage: obj._get_all_partitions(product, num) and returns: partitions