docstr: get autodiff grads from optree string expression
  f_str: the string of expression to be executed
  tensors: numpy tensor vals
docstr_tok: ["get","autodiff","grads","from","optree","string","expression","f_str",":","the","string","of","expression","to","be","executed","tensors",":","numpy","tensor","vals"]
code: def _get_autodiff_grads_and_val(
      self, f_str, tensor_vals, get_op_tree=False, next_error=None
  ):
      """
      get autodiff grads from optree string expression
      f_str: the string of expression to be executed
      tensors: numpy tensor vals
      """
      # backend
      be = self.be  # used in f_str
      # init gpu tensors
      count = 0
      tensors = []
      for tensor_val in tensor_vals:
          exec(
              'x%s = self.be.array(tensor_val, name="x%s", dtype=self.dtype)'
              % (count, count)
          )
          exec("tensors.append(x%s)" % count)
          count += 1
      # build op_tree
      f = None
      f = eval(f_str)
      # evaluate op tree
      f_val = be.empty(f.shape)
      f_val[:] = f
      # init next error
      if next_error is not None:
          next_error = self.be.array(next_error)
      # get gradient
      ad = Autodiff(f, be, next_error=next_error)
      # get list
      if get_op_tree:
          gradients = list(ad.get_grad_op_tree(tensors))
      else:
          gradients = list(ad.get_grad_asnumpyarray(tensors))
  
      return [gradients, f_val.get()]
  
imports: from builtins import zip
  import numpy
  import pprint
  import pytest
  from neon import NervanaObject
  from neon.backends.autodiff import Autodiff
  from utils import allclose_with_out
label_desc: Use image node_id 4 for calling the TestAutodiff obj's underlying member method code with example usage: obj._get_autodiff_grads_and_val(f_str, tensor_vals, get_op_tree, next_error) and returns: list