nodes: 0, module; 1, function_definition; 2, function_name:_from_derivatives; 3, parameters; 4, block; 5, identifier:xi; 6, identifier:yi; 7, identifier:x; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, expression_statement; 12, import_from_statement; 13, comment:# return the method for compat with scipy version & backwards compat; 14, expression_statement; 15, expression_statement; 16, return_statement; 17, identifier:order; 18, None; 19, identifier:der; 20, integer:0; 21, identifier:extrapolate; 22, False; 23, comment:"""
      Convenience function for interpolate.BPoly.from_derivatives.
  
      Construct a piecewise polynomial in the Bernstein basis, compatible
      with the specified values and derivatives at breakpoints.
  
      Parameters
      ----------
      xi : array_like
          sorted 1D array of x-coordinates
      yi : array_like or list of array-likes
          yi[i][j] is the j-th derivative known at xi[i]
      order: None or int or array_like of ints. Default: None.
          Specifies the degree of local polynomials. If not None, some
          derivatives are ignored.
      der : int or list
          How many derivatives to extract; None for all potentially nonzero
          derivatives (that is a number equal to the number of points), or a
          list of derivatives to extract. This numberincludes the function
          value as 0th derivative.
       extrapolate : bool, optional
          Whether to extrapolate to ouf-of-bounds points based on first and last
          intervals, or to return NaNs. Default: True.
  
      See Also
      --------
      scipy.interpolate.BPoly.from_derivatives
  
      Returns
      -------
      y : scalar or array_like
          The result, of length R or length M or M by R.
      """; 24, dotted_name; 25, dotted_name; 26, assignment; 27, assignment; 28, call; 29, identifier:scipy; 30, identifier:interpolate; 31, identifier:method; 32, attribute; 33, identifier:m; 34, call; 35, identifier:m; 36, argument_list; 37, attribute; 38, identifier:from_derivatives; 39, identifier:method; 40, argument_list; 41, identifier:x; 42, identifier:interpolate; 43, identifier:BPoly; 44, identifier:xi; 45, call; 46, keyword_argument; 47, keyword_argument; 48, attribute; 49, argument_list; 50, identifier:orders; 51, identifier:order; 52, identifier:extrapolate; 53, identifier:extrapolate; 54, identifier:yi; 55, identifier:reshape; 56, unary_operator; 57, integer:1; 58, integer:1
code: def _from_derivatives(xi, yi, x, order=None, der=0, extrapolate=False):
      """
      Convenience function for interpolate.BPoly.from_derivatives.
  
      Construct a piecewise polynomial in the Bernstein basis, compatible
      with the specified values and derivatives at breakpoints.
  
      Parameters
      ----------
      xi : array_like
          sorted 1D array of x-coordinates
      yi : array_like or list of array-likes
          yi[i][j] is the j-th derivative known at xi[i]
      order: None or int or array_like of ints. Default: None.
          Specifies the degree of local polynomials. If not None, some
          derivatives are ignored.
      der : int or list
          How many derivatives to extract; None for all potentially nonzero
          derivatives (that is a number equal to the number of points), or a
          list of derivatives to extract. This numberincludes the function
          value as 0th derivative.
       extrapolate : bool, optional
          Whether to extrapolate to ouf-of-bounds points based on first and last
          intervals, or to return NaNs. Default: True.
  
      See Also
      --------
      scipy.interpolate.BPoly.from_derivatives
  
      Returns
      -------
      y : scalar or array_like
          The result, of length R or length M or M by R.
      """
      from scipy import interpolate
  
      # return the method for compat with scipy version & backwards compat
      method = interpolate.BPoly.from_derivatives
      m = method(xi, yi.reshape(-1, 1),
                 orders=order, extrapolate=extrapolate)
  
      return m(x)