def METHOD_NAME(self, datafile):
    windows_line_ending = b"\r\n"
    unix_line_ending = b"\n"
    file_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), datafile)
    with open(encode_path(file_path), "rb") as file_handle:
        content = file_handle.read()
    content = content.replace(windows_line_ending, unix_line_ending)
    logs = pickle.loads(content, encoding="bytes")
    self.events = {}
    for mode in b"send", b"recv":
        for time, event in logs[b"transactions"][mode].items():
            self.events[time] = (mode.decode("latin1"), event)