def METHOD_NAME(self, re_matches, limit=500, lines=5):
    matches = []
    content = self.obj.get_content()
    l_content = len(content)
    for match in re_matches:
        start = match[0]
        value = match[2]
        end = match[1]
        # Start
        if start > limit:
            i_start = start - limit
        else:
            i_start = 0
        str_start = content[i_start:start].splitlines()
        if len(str_start) > lines:
            str_start = '\n'.join(str_start[-lines + 1:])
        else:
            str_start = content[i_start:start]
        # End
        if end + limit > l_content:
            i_end = l_content
        else:
            i_end = end + limit
        str_end = content[end:i_end].splitlines()
        if len(str_end) > lines:
            str_end = '\n'.join(str_end[:lines + 1])
        else:
            str_end = content[end:i_end]
        matches.append((value, f'{str_start}{value}{str_end}'))
    return matches