code: def extract_altitude(self):
          '''
          Extract altitude
          '''
          altitude_ref = {
              0: 1,
              1: -1}
          fields = ['GPS GPSAltitude', 'EXIF GPS GPSAltitude']
          refs = ['GPS GPSAltitudeRef', 'EXIF GPS GPSAltitudeRef']
          altitude, _ = self._extract_alternative_fields(fields, 0, float)
          ref = 0 if not any([True for x in refs if x in self.tags]) else [
              self.tags[x].values for x in refs if x in self.tags][0][0]
          return altitude * altitude_ref[reff extract_altitude(self):
          '''
          Extract altitude
          '''
          altitude_ref = {
              0: 1,
              1: -1}
          fields = ['GPS GPSAltitude', 'EXIF GPS GPSAltitude']
          refs = ['GPS GPSAltitudeRef', 'EXIF GPS GPSAltitudeRef']
          altitude, _ = self._extract_alternative_fields(fields, 0, float)
          ref = 0 if not any([True for x in refs if x in self.tags]) else [
              self.tags[x].values for x in refs if x in self.tags][0][0]
          return altitude * altitude_ref[ref]
docs: Extract altitude