I am seeking python 3.x code that can take a user-provided value in ffmpeg's time duration format and provide a float for the number of seconds represented by that duration. It would parse both formats described in the documentation and handle the s/ms/us prefix for the second format. The only thing I would not need is the optional negative. I mostly need this so I can provide the correct 'start_time' (seconds) for the fade and afade filters.
Please note, I am not asking how to get the duration of an input file. These are string values provided by the user.