code: def get_index_list(nside, nest, region):
          
  
          tokens = parse_hpxregion(region)
          if tokens[0] == 'DISK':
              vec = coords_to_vec(float(tokens[1]), float(tokens[2]))
              ilist = hp.query_disc(nside, vec[0], np.radians(float(tokens[3])),
                                    inclusive=False, nest=nest)
          elif tokens[0] == 'DISK_INC':
              vec = coords_to_vec(float(tokens[1]), float(tokens[2]))
              ilist = hp.query_disc(nside, vec[0], np.radians(float(tokens[3])),
                                    inclusive=True, fact=int(tokens[4]),
                                    nest=nest)
          elif tokens[0] == 'HPX_PIXEL':
              nside_pix = int(tokens[2])
              if tokens[1] == 'NESTED':
                  ipix_ring = hp.nest2ring(nside_pix, int(tokens[3]))
              elif tokens[1] == 'RING':
                  ipix_ring = int(tokens[3])
              else:
                  raise Exception(
                      "Did not recognize ordering scheme %s" % tokens[1])
              ilist = match_hpx_pixel(nside, nest, nside_pix, ipix_ring)
          else:
              raise Exception(
                  "HPX.get_index_list did not recognize region type %s" % tokens[0])
          return ilist
docs: Returns the list of pixels indices for all the pixels in a region
  
          nside    : HEALPix nside parameter
          nest     : True for 'NESTED', False = 'RING'
          region   : HEALPix region string