<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fn_getma(fn, bnum=1, return_ds=False):
 """Get masked array from input filename Parameters fn : str Input filename string bnum : int, optional Band number Returns ------- np.ma.array Masked array containing raster values """

    #Add check for filename existence
    ds = fn_getds(fn)
    out = ds_getma(ds, bnum=bnum)
    if return_ds:
        out = (out, ds)
    return out