Python Create Function From String To Timestamp