code: def _cached_roots_legendre(n):
      """
      Cache roots_legendre results to speed up calls of the fixed_quad
      function.
      """
      if n in _cached_roots_legendre.cache:
          return _cached_roots_legendre.cache[n]
  
      _cached_roots_legendre.cache[n] = roots_legendre(n)
      return _cached_roots_legendre.cache[n]
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  import math
  import warnings
  from numpy import trapz
  from scipy.special import roots_legendre
  from scipy.special import gammaln
  from scipy._lib.six import xrange
label_desc: Use image node_id 1 for calling a global function with example usage: _cached_roots_legendre(n) and returns: _cached_roots_legendre, _cached_roots_legendre