code: def _visibility_to_text(self, distance):
          
  
          if not isinstance(distance, (int, long)):
              raise ValueError("Distance must be an integer not", type(distance))
          if distance < 0:
              raise ValueError("Distance out of bounds, should be 0 or greater")
  
          if 0 <= distance < 1000:
              return 'VP'
          elif 1000 <= distance < 4000:
              return 'PO'
          elif 4000 <= distance < 10000:
              return 'MO'
          elif 10000 <= distance < 20000:
              return 'GO'
          elif 20000 <= distance < 40000:
              return 'VG'
          else:
              return 'EX'
docs: Convert observed visibility in metres to text used in forecast