<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def adjust_container_limits_for_variadic_sequences(headerDir, containers, maxElements):
 """Adjusts the limits of variadic sequence MPL-containers."""

    for container in containers:
        headerFile = os.path.join( headerDir, "limits", container + ".hpp" )
        regexMatch   = r'(define\s+BOOST_MPL_LIMIT_' + container.upper() + r'_SIZE\s+)[0-9]+'
        regexReplace = r'\g<1>' + re.escape( str(maxElements) )
        for line in fileinput.input( headerFile, inplace=1, mode="rU" ):
            line = re.sub(regexMatch, regexReplace, line.rstrip())
            print(line)