def build_frame(cache, keys)
      line, type = keys
      abs_path, lineno, function, _module_name = parse_line(line)

      frame = Stacktrace::Frame.new
      frame.abs_path = abs_path
      frame.filename = strip_load_path(abs_path)
      frame.function = function
      frame.lineno = lineno.to_i
      frame.library_frame = library_frame?(config, abs_path)

      line_count =
        context_lines_for(config, type, library_frame: frame.library_frame)
      frame.build_context line_count

      cache[[line, type]] = frame
    end
def build_frame(cache, keys)
      line, type = keys
      abs_path, lineno, function, _module_name = parse_line(line)

      frame = Stacktrace::Frame.new
      frame.abs_path = abs_path
      frame.filename = strip_load_path(abs_path)
      frame.function = function
      frame.lineno = lineno.to_i
      frame.library_frame = library_frame?(config, abs_path)

      line_count =
        context_lines_for(config, type, library_frame: frame.library_frame)
      frame.build_context line_count

      cache[[line, type]] = frame
    end
rubocop:disable Metrics/AbcSize, Metrics/MethodLength