original_docstring: Evaluate function and return ast.Constant if all arguments are bound.
  
          Args:
              node: Function to evaluate.
  
          Returns:
              Evaluated value.
  
          Raises:
              PulseError: When unsupported or unsafe function is specified.
          
docstring: Evaluate function and return ast.Constant if all arguments are bound.
docstring_tokens: Evaluate function and return ast . Constant if all arguments are bound .
code: def visit_Call(self, node: ast.Call) -> Union[ast.Call, ast.Constant]:
          """Evaluate function and return ast.Constant if all arguments are bound.
  
          Args:
              node: Function to evaluate.
  
          Returns:
              Evaluated value.
  
          Raises:
              PulseError: When unsupported or unsafe function is specified.
          """
          if not isinstance(node.func, ast.Name):
              raise PulseError("Unsafe expression is detected.")
          node.args = [self.visit(arg) for arg in node.args]
          if all(isinstance(arg, (ast.Constant, ast.Num)) for arg in node.args):
              if node.func.id not in self._math_ops.keys():
                  raise PulseError("Function %s is not supported." % node.func.id)
              _args = [arg.n for arg in node.args]
              _val = self._math_ops[node.func.id](*_args)
              if not _val.imag:
                  _val = _val.real
              val = ast.Constant(n=_val)
              return ast.copy_location(val, node)
          return node
code_tokens: def visit_Call ( self , node : ast . Call ) -> Union [ ast . Call , ast . Constant ] : if not isinstance ( node . func , ast . Name ) : raise PulseError ( "Unsafe expression is detected." ) node . args = [ self . visit ( arg ) for arg in node . args ] if all ( isinstance ( arg , ( ast . Constant , ast . Num ) ) for arg in node . args ) : if node . func . id not in self . _math_ops . keys ( ) : raise PulseError ( "Function %s is not supported." % node . func . id ) _args = [ arg . n for arg in node . args ] _val = self . _math_ops [ node . func . id ] ( * _args ) if not _val . imag : _val = _val . real val = ast . Constant ( n = _val ) return ast . copy_location ( val , node ) return node
short_docstring: Evaluate function and return ast.Constant if all arguments are bound.
short_docstring_tokens: Evaluate function and return ast . Constant if all arguments are bound .
comment: """Evaluate function and return ast.Constant if all arguments are bound.
  
          Args:
              node: Function to evaluate.
  
          Returns:
              Evaluated value.
  
          Raises:
              PulseError: When unsupported or unsafe function is specified.
          """