<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def regions_coverage(bed_file, target_name, data):
 """Generate coverage over regions of interest using mosdepth. """

    ready_bed = tz.get_in(["depth", target_name, "regions"], data)
    if ready_bed:
        return ready_bed
    else:
        return run_mosdepth(data, target_name, bed_file).regions