<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def compute_gmfs(rupgetter, srcfilter, param, monitor):
 """ Compute GMFs and optionally hazard curves """

    getter = GmfGetter(rupgetter, srcfilter, param['oqparam'])
    with monitor('getting ruptures'):
        getter.init()
    return getter.compute_gmfs_curves(monitor)