code: def fromfd(fd, family, type, proto=0):
      
      nfd = dup(fd)
      return socket(family, type, proto, nfd)
docs: fromfd(fd, family, type[, proto]) -> socket object
  
      Create a socket object from a duplicate of the given file
      descriptor.  The remaining arguments are the same as for socket().