Return the process group associated with the terminal given by fd (an open file descriptor as returned by os.open()).
os.tcgetpgrp(fd, /)