For those who are too lazy to check out the rules on fiba.com
Article 9.8 A period, extra period or game shall end when the game clock signal sounds for the
end of playing time.
Article 46.9 Approve and sign the scoresheet at the end of playing time, terminating the officials' administration and connection with the game. The officials' power shall begin when they arrive on the playing court twenty (20) minutes before the game is scheduled to begin, and end with the end of the playing time as approved by the officials.
Aricle 46.10 Record, on the reverse side of the scoresheet, before signing it, any forfeit, any
disqualifying foul or unsportsmanlike behaviour by players, coaches, assistant coaches or team followers that occurs prior to the twenty (20) minutes before the game is scheduled to begin, or between the end of playing time and the approval
and signing of the scoresheet. In such a case, the referee (commissioner, if present)must send a detailed report to the organising body of the competition.
Hope the helps you understanding!