code: def _3d_version_for(func):
      """Creates an alias for the 3D version of the given layout algoritm.
  
      This function is a decorator that creates a method which calls I{func} after
      attaching C{dim=3} to the list of keyword arguments.
  
      @param func: must be a method of the Graph object.
      @return: a new method
      """
  
      def result(*args, **kwds):
          kwds["dim"] = 3
          return func(*args, **kwds)
  
      result.__name__ = "%s_3d" % func.__name__
      result.__doc__ = (
          """Alias for L{%s()} with dim=3.\n\n@see: Graph.%s()"""
          % (
              func.__name__,
              func.__name__,
          )
      )
      return result
  
imports: from math import sin, cos, pi
  from igraph._igraph import GraphBase
  from igraph.drawing.utils import BoundingBox
  from igraph.statistics import RunningMean
label_desc: Use image node_id 5 for calling a global function with example usage: _3d_version_for(func) and returns: result, func