code: def close(self):
          
          if self.is_open():
              fd = self._fd
              self._fd = -1
              if self.uses_nanoconfig:
                  wrapper.nc_close(fd)
              else:
                  _nn_check_positive_rtn(wrapper.nn_close(fd))
docs: Close the socket