code: def _create_socket(self, socket_family):
          
          sock = socket.socket(socket_family, socket.SOCK_STREAM, 0)
          sock.settimeout(self._parameters['timeout'] or None)
          if self.use_ssl:
              if not compatibility.SSL_SUPPORTED:
                  raise AMQPConnectionError(
                      'Python not compiled with support for TLSv1 or higher'
                  )
              sock = self._ssl_wrap_socket(sock)
          return sock
docs: Create Socket.
  
          :param int socket_family:
          :rtype: socket.socket