()
return processed_stack
Returns the stack trace of the current execution frame.

  Returns:
    A list of `StackTraceEntry` named tuples corresponding to the current stack
    trace of the process, truncated to immediately before entry into
    PyMJCF internal code.
Returns the stack trace of the current execution frame.
Returns the stack trace of the current execution frame .
def _get_actual_current_stack_trace():
  """Returns the stack trace of the current execution frame.

  Returns:
    A list of `StackTraceEntry` named tuples corresponding to the current stack
    trace of the process, truncated to immediately before entry into
    PyMJCF internal code.
  """
  raw_stack = traceback.extract_stack()
  processed_stack = []
  for raw_stack_item in raw_stack:
    stack_item = StackTraceEntry(*raw_stack_item)
    if (stack_item.filename.startswith(MODULE_PATH)
        and not stack_item.filename.endswith('_test.py')):
      break
    else:
      processed_stack.append(stack_item)
  return processed_stack
def _get_actual_current_stack_trace ( ) : raw_stack = traceback . extract_stack ( ) processed_stack = [ ] for raw_stack_item in raw_stack : stack_item = StackTraceEntry ( * raw_stack_item ) if ( stack_item . filename . startswith ( MODULE_PATH ) and not stack_item . filename . endswith ( '_test.py' ) ) : break else : processed_stack . append ( stack_item ) return processed_stack