<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def maxline(filename, use_cache_only=False):
 """Return the maximum line number filename after taking into account line remapping. If no remapping then this is the same as size"""

    if filename not in file2file_remap_lines:
        return size(filename, use_cache_only)
    max_lineno = -1
    remap_line_entry = file2file_remap_lines.get(filename)
    if not remap_line_entry:
        return size(filename, use_cache_only)
    for t in remap_line_entry.from_to_pairs:
        max_lineno = max(max_lineno, t[1])
    if max_lineno == -1:
        return size(filename, use_cache_only)
    else:
        return max_lineno