Forbid dots in `update_metadata` functions

Hello, I was trying to update_metadata of a job with a string containing a dot - which should be forbidden. The submission went fine, but then I found an error:
bson.errors.InvalidDocument: key 'metadata.H2_num' must not contain '.'
I would like to know how to make sure that no keys in the argument of job.update_metadata() contain a dot.
Something like:

if any([ '.' in k for k in mydict.keys() ]):
     raise ValueError("Periods are not allowed in update_metadata")

Thank you

Hello @mdigennaro ,
Could you post an example script that’s causing the error?
Thanks,
Hrushikesh