code: def complex(
      maximal=[
          (0, 3, 2, 7),
          (0, 6, 2, 7),
          (0, 7, 5, 4),
          (0, 7, 5, 1),
          (0, 7, 4, 6),
          (0, 3, 1, 7),
      ]
  ):
      """Faces from simplices
  
      Take a list of maximal simplices (by default a triangulation of a
      cube into 6 tetrahedra) and computes all faces
  
      Parameters
      ----------
      maximal : sequence of sequences, optional
         Default is triangulation of cube into tetrahedra
  
      Returns
      -------
      faces : dict
      """
      faces = {}
  
      l = [len(list(x)) for x in maximal]
      for i in range(np.max(l)):
          faces[i + 1] = set()
  
      for simplex in maximal:
          simplex = list(simplex)
          simplex.sort()
          for k in range(1, len(simplex) + 1):
              for v in combinations(simplex, k):
                  if len(v) == 1:
                      v = v[0]
                  faces[k].add(v)
      return faces
  
file_path: nipy/nipy/algorithms/statistics/utils.py
imports: from itertools import combinations
  import numpy
  from scipy.stats import norm
label_desc: Use image node_id 4 for calling a global function with example usage: complex(maximal) and returns: faces