def METHOD_NAME(self, input_surface: pygame.surface.Surface,
                              rect: Union[pygame.Rect, None] = None):
    """
    Applies this gradient to a specified input surface using blending multiplication.
    As a result this method works best when the input surface is a mostly white, stencil shape
    type surface.
    :param input_surface:
    :param rect: The rectangle on the surface to apply the gradient to. If None, applies to the
                 whole surface.
    """
    # scale the gradient up to the right size
    input_surface_size = input_surface.get_size()
    inverse_rotated_input = pygame.transform.rotate(input_surface, -self.angle_direction)
    gradient_size = inverse_rotated_input.get_rect().size
    gradient_surf = pygame.surface.Surface(gradient_size, flags=pygame.SRCALPHA, depth=32)
    pygame.transform.scale(self.gradient_surface, gradient_size, gradient_surf)
    gradient_surf = pygame.transform.rotate(gradient_surf, self.angle_direction)
    if rect is not None:
        input_surface.set_clip(rect)
        input_surface.blit(gradient_surf, rect, special_flags=pygame.BLEND_RGBA_MULT)
        input_surface.set_clip(None)
    else:
        gradient_placement_rect = gradient_surf.get_rect()
        gradient_placement_rect.center = (int(input_surface_size[0] / 2),
                                          int(input_surface_size[1] / 2))
        input_surface.blit(gradient_surf,
                           gradient_placement_rect,
                           special_flags=pygame.BLEND_RGBA_MULT)