code: def sanitize_metadata(self, metadata, replace_hyphen_with="-"):
          
          return {str(k).replace("-", replace_hyphen_with): str(v)
                  for k, v in (metadata or {}).items() if v is not None}
docs: Convert non-string metadata values to strings and drop null values