<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fopenat(base_fd, path):
 """ Does openat read-only, then does fdopen to get a file object """


    return os.fdopen(openat(base_fd, path, os.O_RDONLY), 'rb')