def function(self,p):
generators = self._advance_pattern_generators(p)<EOL>assert hasattr(p.operator,'<STR_LIT>'),repr(p.operator)+"<STR_LIT>"<EOL>patterns = [pg(xdensity=p.xdensity,ydensity=p.ydensity,<EOL>bounds=p.bounds,mask=p.mask,<EOL>x=p.x+p.size*(pg.x*np.cos(p.orientation)- pg.y*np.sin(p.orientation)),<EOL>y=p.y+p.size*(pg.x*np.sin(p.orientation)+ pg.y*np.cos(p.orientation)),<EOL>orientation=pg.orientation+p.orientation,<EOL>size=pg.size*p.size)<EOL>for pg in generators]<EOL>image_array = p.operator.reduce(patterns)<EOL>return image_array<EOL>
Constructs combined pattern out of the individual ones.