Set equation attribute from a string.
        
        Checks to see that the string is well-formed, and
        then uses sympy.sympify to evaluate.
        
        Args:
          equation_str (str): A string representation (in valid Python)
            of the equation to be added.
          fail_silently (bool): Whether to raise sympy.SympifyError if
            equation cannot be parsed. Useful if calling from other
            application.
          check_equation (bool): Whether or not to run regex check
            on the equation_str argument.

def set_equation_from_string(self, equation_str, fail_silently=False,
                                 check_equation=True):
        """Set equation attribute from a string.
        
        Checks to see that the string is well-formed, and
        then uses sympy.sympify to evaluate.
        
        Args:
          equation_str (str): A string representation (in valid Python)
            of the equation to be added.
          fail_silently (bool): Whether to raise sympy.SympifyError if
            equation cannot be parsed. Useful if calling from other
            application.
          check_equation (bool): Whether or not to run regex check
            on the equation_str argument.
        """
        if check_equation:
            regex_check(equation_str)
        
        # Create Queue to allow for timeout
        q = multiprocessing.Queue()
        
        def prep(conn):
            equation, error = None, False
            try:
                equation = sympy.sympify(equation_str)
            except sympy.SympifyError:
                error = True
            q.put((equation, error))
        p = multiprocessing.Process(target=prep, args=(q,))
        p.start()
        
        # See if we can get the equation within 5 seconds
        try:
            equation, error = q.get(timeout=5)
        except queue.Empty:
            equation, error = None, None
        q.close()
        
        # If the process is still running, kill it
        if p.is_alive():
            p.terminate()
            p.join()
        
        # Check if error was raised in sympify call.
        # If we don't want to fail silently, recall sympify to reraise error
        if error and not fail_silently:
            sympy.sympify(equation_str)
        
        self.equation = equation