code: def add_direction(self, direction, ref="T", precision=100):
          
          # normalize direction
          direction = direction % 360.0
          self._ef["GPS"][piexif.GPSIFD.GPSImgDirection] = (
              int(abs(direction) * precision), precision)
          self._ef["GPS"][piexif.GPSIFD.GPSImgDirectionRef] = ref
docs: Add image direction.