How do I convert this code from Javascript to Python that uses the Promise function? [duplicate]

 function timeout(ms) {
    return new Promise(resolve => setTimeout(resolve, ms))
}

I am trying to convert this piece of code from Javascript to Python but I can’t figure out how to do it,