The last line of  the ground_motion_fields function returns a `sites.expand(gmf, total_sites, placeholder=0)`. The new branch in the engine passes a subset of the whole site_collection as well as the parameter num_sites=total_sites > len(sites). The goal is to get as outputs arrays always of the same length, filled with zeros in locations outside the passed sites (which are actually the sites affected by the given rupture).