docs: def yaml(
              self,
              dirPath=None):
          """*Render the results in yaml format*
  
          **Key Arguments:**
              - ``dirPath`` -- the path to the directory to save the rendered results to. Default *None*
  
          **Return:**
              - `yamlSources` -- the top-level transient data
              - `yamlPhot` -- all photometry associated with the transients
              - `yamlSpec` -- all spectral data associated with the transients
              - `yamlFiles`  -- all files associated with the matched transients found on the tns
  
          **Usage:**
  
              To render the results in yaml format:
  
              .. code-block:: python
  
                  yamlSources, yamlPhot, yamlSpec, yamlFiles  = tns.yaml()
                  print yamlSources
  
              .. code-block:: text
  
                  - TNSId: 2016asf
                    TNSName: SN2016asf
                    decDeg: 31.1126
                    decSex: '+31:06:45.36'
                    discDate: '2016-03-06 08:09:36'
                    discMag: '17.1'
                    discMagFilter: V-Johnson
                    discSurvey: ASAS-SN
                    discoveryName: ASASSN-16cs
                    hostName: KUG 0647+311
                    hostRedshift: null
                    objectUrl: http://wis-tns.weizmann.ac.il/object/2016asf
                    raDeg: 102.65304166666667
                    raSex: '06:50:36.73'
                    separationArcsec: '0.66'
                    separationEastArcsec: '-0.13'
                    separationNorthArcsec: '0.65'
                    specType: SN Ia
                    transRedshift: '0.021'
  
              You can save the results to file by passing in a directory path within which to save the files to. The four flavours of data (sources, photometry, spectra and files) are saved to separate files but all data can be assoicated with its transient source using the transient's unique `TNSId`.
  
              .. code-block:: python
  
                  tns.yaml("~/tns")
  
              .. image:: https://i.imgur.com/ZpJIC6p.png
                  :width: 800px
                  :alt: yaml output
          """
  
          if dirPath:
              p = self._file_prefix()
              yamlSources = self.sourceResults.yaml(
                  filepath=dirPath + "/" + p + "sources.yaml")
              yamlPhot = self.photResults.yaml(
                  filepath=dirPath + "/" + p + "phot.yaml")
              yamlSpec = self.specResults.yaml(
                  filepath=dirPath + "/" + p + "spec.yaml")
              yamlFiles = self.relatedFilesResults.yaml(
                  filepath=dirPath + "/" + p + "relatedFiles.yaml")
          else:
              yamlSources = self.sourceResults.yaml()
              yamlPhot = self.photResults.yaml()
              yamlSpec = self.specResults.yaml()
              yamlFiles = self.relatedFilesResults.yaml()
          return yamlSources, yamlPhot, yamlSpec, yamlFiles