IT IS SIMPLE
\n# CODE\n\nimport pandas as pd\n\ndef total_time(employees: pd.DataFrame) -> pd.DataFrame:\n    init = employees.groupby(["emp_id", "event_day"]).in_time.sum()
\n# CODE\n```\nimport pandas as pd\n\ndef total_time(employees: pd.DataFrame) -> pd.DataFrame:\n    init = employees.groupby(["emp_id", "event_day"]).in_time.sum().reset_index()\n    otit = employees.groupby(["emp_id", "event_day"]).out_time.sum().reset_index()\n    otit["out_time"] -= init["in_time"]\n    return otit.sort_values(by=["out_time"]).rename(columns={"event_day" : "day", "out_time" : "total_time"})[["day", "emp_id", "total_time"]]\n```\n\n### PLS>>
['Database', 'Pandas']