code: def generate_combinations(items, n):
      """Combine sets of size n from items
  
      Parameters
      ----------
      items : sequence
      n : int
  
      Returns
      -------
      ic : iterator
  
      Examples
      --------
      >>> from dipy.tracking.metrics import generate_combinations
      >>> ic=generate_combinations(range(3),2)
      >>> for i in ic: print(i)
      [0, 1]
      [0, 2]
      [1, 2]
      """
  
      if n == 0:
          yield []
      elif n == 2:
          # if n=2 non_recursive
          for i in range(len(items) - 1):
              for j in range(i + 1, len(items)):
                  yield [i, j]
      else:
          # if n>2 uses recursion
          for i in range(len(items)):
              for cc in generate_combinations(items[i + 1 :], n - 1):
                  yield [items[i]] + cc
  
imports: from dipy.utils.deprecator import deprecate_with_version
  from dipy.tracking.streamline import set_number_of_points
  import numpy
  from scipy.interpolate import splprep, splev
label_desc: Use image node_id 11 for calling a global function with example usage: generate_combinations(items, n) without return types