parameters: (self, x, y)
return_statement: return self.distance_mask[py, px]
docstring: Get the distance of a point to the nearest foreground in perception GT semantic prior mask (dilated).
          :param x: <float>. Global x.
          :param y: <float>. Global y.
          :return: <float>. Distance to nearest foreground, if not in distance mask, return -1.
docstring_summary: Get the distance of a point to the nearest foreground in perception GT semantic prior mask (dilated).
          :param x: <float>. Global x.
          :param y: <float>. Global y.
          :return: <float>. Distance to nearest foreground, if not in distance mask, return -1.
docstring_tokens: Get the distance of a point to the nearest foreground in perception GT semantic prior mask ( dilated ) . : param x : <float > . Global x . : param y : <float > . Global y . : return : <float > . Distance to nearest foreground if not in distance mask return - 1 .
function: def dist_to_mask(self, x, y):
          """
          Get the distance of a point to the nearest foreground in perception GT semantic prior mask (dilated).
          :param x: <float>. Global x.
          :param y: <float>. Global y.
          :return: <float>. Distance to nearest foreground, if not in distance mask, return -1.
          """
          px, py = self.get_pixel(x, y)
  
          if px < 0 or px >= self.distance_mask.shape[1] or py < 0 or py >= self.distance_mask.shape[0]:
              return -1
  
          return self.distance_mask[py, px]
function_tokens: def dist_to_mask ( self , x , y ) : px , py = self . get_pixel ( x , y ) if px < 0 or px >= self . distance_mask . shape [ 1 ] or py < 0 or py >= self . distance_mask . shape [ 0 ] : return - 1 return self . distance_mask [ py , px ]