code: def bandwidth_factor(nbr_data_pts, deriv_order=0):
      '''
          Scale factor for one-dimensional plug-in bandwidth selection.
      '''
      if deriv_order == 0:
          return (3.0*nbr_data_pts/4)**(-1.0/5)
  
      if deriv_order == 2:
          return (7.0*nbr_data_pts/4)**(-1.0/9)
  
      raise ValueError('Not implemented for derivative of order {}'.format(deriv_order)f bandwidth_factor(nbr_data_pts, deriv_order=0):
      '''
          Scale factor for one-dimensional plug-in bandwidth selection.
      '''
      if deriv_order == 0:
          return (3.0*nbr_data_pts/4)**(-1.0/5)
  
      if deriv_order == 2:
          return (7.0*nbr_data_pts/4)**(-1.0/9)
  
      raise ValueError('Not implemented for derivative of order {}'.format(deriv_order))
docs: Scale factor for one-dimensional plug-in bandwidth selection.