def METHOD_NAME(self, cache=None):
    if cache is None:
        cache = {}
    obj = self.project.loader.find_object_containing(self.function.addr)
    if obj is None:
        l.warning("No object contains function %s", self.function.name)
        return []
    if self.function.addr not in obj.addr_to_line:
        l.info("No line data for function %s", self.function.name)
        return []
    lines = SortedList()
    for block in self.function.blocks:
        for insn in block.instruction_addrs:
            if insn in obj.addr_to_line:
                lines.update((*filename_line, insn) for filename_line in obj.addr_to_line[insn])
    ranges = []
    for filename, line, _ in lines:
        if any(r[0] == filename and r[1] <= line <= r[2] for r in ranges):
            continue
        file_lines = self._open_file(filename, cache=cache)
        if file_lines is None:
            continue
        if line - 1 >= len(file_lines) or line - 1 < 0:
            # a non-existent line number is specified. skip this record
            l.warning(
                "Line number %d does not exist in file %s. It might be the wrong source code file.", line, filename
            )
            continue
        range_start = line
        range_end = line
        # find the first { on the line
        # find the matching }
        # scan backwards for any lines that aren't blank and don't have {}; on them
        # scan forwards for any lines continued via \
        col = file_lines[range_start - 1].find("{")
        if col != -1:
            col += 1
            stack = 1
            while range_end - 1 < len(file_lines):
                while col < len(file_lines[range_end - 1]):
                    ch = file_lines[range_end - 1][col]
                    if ch == "{":
                        stack += 1
                    elif ch == "}":
                        stack -= 1
                    if stack == 0:
                        break
                    col += 1
                else:
                    col = 0
                    range_end += 1
                    continue
                break
        maybe_prev_line = range_start - 1
        while maybe_prev_line >= 0:
            linedata = file_lines[maybe_prev_line - 1].strip()
            if linedata and not any(c in linedata for c in "{};"):
                range_start = maybe_prev_line
                maybe_prev_line -= 1
            else:
                break
        while range_end - 1 < len(file_lines) - 1:
            linedata = file_lines[range_end - 1].strip()
            if linedata.endswith("\\"):
                range_end += 1
            else:
                break
        if any(
            r[0] == filename and (r[1] <= range_start <= r[2] or range_start <= r[1] <= range_end) for r in ranges
        ):
            l.error("Detected line ranges are overlapping?")
        ranges.append((filename, range_start, range_end))
    return ranges