class_docstr: Quadrature rules are implemented using this class, in order to
  simplify the code and provide a common infrastructure
  for tasks such as error estimation and node caching.
  
  You can implement a custom quadrature rule by subclassing
  :class:`QuadratureRule` and implementing the appropriate
  methods. The subclass can then be used by :func:`~mpmath.quad` by
  passing it as the *method* argument.
  
  :class:`QuadratureRule` instances are supposed to be singletons.
  :class:`QuadratureRule` therefore implements instance caching
  in :func:`~mpmath.__new__`.
class_docstr_tok: ["Quadrature","rules","are","implemented","using","this","class",",","in","order","to","simplify","the","code","and","provide","a","common","infrastructure","for","tasks","such","as","error","estimation","and","node","caching",".","You","can","implement","a","custom","quadrature","rule","by","subclassing",":","class",":","`","QuadratureRule","`","and","implementing","the","appropriate","methods",".","The","subclass","can","then","be","used","by",":","func",":","`","~mpmath.quad","`","by","passing","it","as","the","*","method","*","argument",".",":","class",":","`","QuadratureRule","`","instances","are","supposed","to","be","singletons",".",":","class",":","`","QuadratureRule","`","therefore","implements","instance","caching","in",":","func",":","`","~mpmath.__new__","`","."]
docstr: Compute nodes for the standard interval `[-1, 1]`. Subclasses
  should probably implement only this method, and use
  :func:`~mpmath.get_nodes` method to retrieve the nodes.
docstr_tok: ["Compute","nodes","for","the","standard","interval","`","[","-1",",","1","]","`",".","Subclasses","should","probably","implement","only","this","method",",","and","use",":","func",":","`","~mpmath.get_nodes","`","method","to","retrieve","the","nodes","."]
code: def calc_nodes(self, degree, prec, verbose=False):
      r"""
      Compute nodes for the standard interval `[-1, 1]`. Subclasses
      should probably implement only this method, and use
      :func:`~mpmath.get_nodes` method to retrieve the nodes.
      """
      raise NotImplementedError
  
imports: import math
  from ..libmp.backend import xrange
label_desc: Use image node_id 3 for calling the QuadratureRule obj's underlying member method code with example usage: obj.calc_nodes(degree, prec, verbose) without return types