def crop_surface(
    surface: Surface,
    cropping_rect: Rect,
) -> [
    {'name': 'cropped_surface', 'type': Surface},
]:
    """Return new surface from rect cropped from given surface."""
    return surface.subsurface(cropping_rect).copy()
Return new surface from rect cropped from given surface.
nodezator/graphman/capsulenode/pygamedefs.py