This function should NOT be called directly, it registers via the
the write() method of an
ObsPy Catalog object, call this instead.
Parameters:
catalog (Catalog) The ObsPy Catalog object to write.
filename (string or open file-like object) Filename to write or open file-like object.
validate (Boolean, optional) If True, the final QuakeML file will be validated against
the QuakeML schema file. Raises an AssertionError if the validation
fails.