code: def write(self, filename, format='tar'):
          
          Party(families=[self]).write(filename=filename, format=format)
          return
docs: Write Family out, select output format.
  
          :type format: str
          :param format:
              One of either 'tar', 'csv', or any obspy supported
              catalog output.
          :type filename: str
          :param filename: Path to write file to.
  
          .. Note:: csv format will write out detection objects, all other
              outputs will write the catalog.  These cannot be rebuilt into
              a Family object.  The only format that can be read back into
              Family objects is the 'tar' type.
  
          .. Note:: csv format will append detections to filename, all others
              will overwrite any existing files.
  
          .. rubric:: Example
  
          >>> family = Family(
          ...     template=Template(name='a', st=read()), detections=[
          ...     Detection(template_name='a', detect_time=UTCDateTime(0) + 200,
          ...               no_chans=8, detect_val=4.2, threshold=1.2,
          ...               typeofdet='corr', threshold_type='MAD',
          ...               threshold_input=8.0),
          ...     Detection(template_name='a', detect_time=UTCDateTime(0),
          ...               no_chans=8, detect_val=4.5, threshold=1.2,
          ...               typeofdet='corr', threshold_type='MAD',
          ...               threshold_input=8.0),
          ...     Detection(template_name='a', detect_time=UTCDateTime(0) + 10,
          ...               no_chans=8, detect_val=4.5, threshold=1.2,
          ...               typeofdet='corr', threshold_type='MAD',
          ...               threshold_input=8.0)])
          >>> family.write('test_family')