def METHOD_NAME(*, target_thread: Optional[str] = None) -> List[str]:
	# noinspection PyProtectedMember
	from sys import _current_frames
	lines = []
	stack_map = _current_frames().copy()
	for thread in threading.enumerate():
		thread_id, thread_name = thread.ident, thread.name
		if target_thread is not None and thread_name != target_thread:
			continue
		if thread_id in stack_map:
			lines.append("Thread {} (id {})".format(thread_name, thread_id))
			for filename, lineno, func_name, line in traceback.extract_stack(stack_map[thread_id]):
				lines.append('  File "{}", line {}, in {}'.format(filename, lineno, func_name))
				if line:
					lines.append('    {}'.format(line.strip()))
	return lines