code: def _eval(self, text):
          
          from spyder_kernels.py3compat import is_text_string
  
          assert is_text_string(text)
          ns = self._get_current_namespace(with_magics=True)
          try:
              return eval(text, ns), True
          except:
              return None, False
docs: Evaluate text and return (obj, valid)
          where *obj* is the object represented by *text*
          and *valid* is True if object evaluation did not raise any exception