code: def normalize_bearing(bearing, check_hex=False):
      '''
      Normalize bearing and convert from hex if
      '''
      if bearing > 360 and check_hex:
          # fix negative value wrongly parsed in exifread
          # -360 degree -> 4294966935 when converting from hex
          bearing = bin(int(bearing))[2:]
          bearing = ''.join([str(int(int(a) == 0)) for a in bearing])
          bearing = -float(int(bearing, 2))
      bearing %= 360
      return bearinf normalize_bearing(bearing, check_hex=False):
      '''
      Normalize bearing and convert from hex if
      '''
      if bearing > 360 and check_hex:
          # fix negative value wrongly parsed in exifread
          # -360 degree -> 4294966935 when converting from hex
          bearing = bin(int(bearing))[2:]
          bearing = ''.join([str(int(int(a) == 0)) for a in bearing])
          bearing = -float(int(bearing, 2))
      bearing %= 360
      return bearing
docs: Normalize bearing and convert from hex if