<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _enforce_max_region_size(in_file, data):
 """Ensure we don't have any chunks in the region greater than 20kb. VarDict memory usage depends on size of individual windows in the input file. This breaks regions into 20kb chunks with 250bp overlaps. 20kb gives ~1Gb/core memory usage and the overlaps avoid missing indels spanning a gap. Downstream VarDict merging sorts out any variants across windows. https://github.com/AstraZeneca-NGS/VarDictJava/issues/64 """

    max_size = 20000
    overlap_size = 250
    def _has_larger_regions(f):
        return any(r.stop - r.start > max_size for r in pybedtools.BedTool(f))
    out_file = "%s-regionlimit%s" % utils.splitext_plus(in_file)
    if not utils.file_exists(out_file):
        if _has_larger_regions(in_file):
            with file_transaction(data, out_file) as tx_out_file:
                pybedtools.BedTool().window_maker(w=max_size,
                                                  s=max_size - overlap_size,
                                                  b=pybedtools.BedTool(in_file)).saveas(tx_out_file)
        else:
            utils.symlink_plus(in_file, out_file)
    return out_file