code: def _update_metadata(self, data, ds_info):
          
          # Metadata from the dataset definition
          data.attrs.update(ds_info)
  
          # If the file_type attribute is a list and the data is xarray
          # the concat of the dataset will not work. As the file_type is
          # not needed this will be popped here.
          if 'file_type' in data.attrs:
              data.attrs.pop('file_type')
  
          # Metadata discovered from the file
          data.attrs.update(
              {'platform_name': self.platform_name,
               'sensor': self.sensor,
               'sector': self.sector,
               'yaw_flip': self.meta['yaw_flip']}
          )
          if self.meta['lon0'] is not None:
              # Attributes only available for full disc images. YAML reader
              # doesn't like it if satellite_* is present but None
              data.attrs.update(
                  {'satellite_longitude': self.meta['lon0'],
                   'satellite_latitude': self.meta['lat0'],
                   'satellite_altitude': ALTITUDE,
                   'nadir_row': self.meta['nadir_row'],
                   'nadir_col': self.meta['nadir_col'],
                   'area_def_uniform_sampling': self.meta['area_def_uni']}
              )
docs: Update metadata of the given DataArray