How to Solve NameError: name 'Optional' is not defined -- typing

Erorr: name 'Optional' is not defined

NameError: name 'Optional' is not defined

Solution: name 'Optional' is not defined

from typing import Optional