def METHOD_NAME() -> Optional['IconScoreContext']:
    context_stack: List['IconScoreContext'] = getattr(_thread_local_data, 'context_stack', None)
    if context_stack is not None and len(context_stack) > 0:
        # pylint: disable=unsubscriptable-object
        return context_stack[-1]
    else:
        return None