#NEWLINE# def masks( self , dims , z = None ) : #NEWLINE# #INDENT# '\n        Binary masks with regions filled in as 1s or 0s.\n\n        Parameters\n        ----------\n        dims : array-like\n            Specify the dimensions of the image containing the polygons\n\n        z : int, optional, default=None\n            Use a z-index to insert regions into the appropriate slice if using\n            three-dimensional volumes.\n        ' #NEWLINE# coords = self . _coords ( ) #NEWLINE# return [ polygon_to_mask ( x , x , z ) for x in coords ]