code: def _execute_prepared_statement(self, list_of_parameter_values):
          
          portal_name = ""
          parameter_type_oids = [metadata['data_type_oid'] for metadata in self._param_metadata]
          parameter_count = len(self._param_metadata)
  
          try:
              if len(list_of_parameter_values) == 0:
                  raise ValueError("Empty list/tuple, nothing to execute")
              for parameter_values in list_of_parameter_values:
                  if parameter_values is None:
                      parameter_values = ()
                  self._logger.info(u'Bind parameters: {}'.format(parameter_values))
                  if len(parameter_values) != parameter_count:
                      msg = ("Invalid number of parameters for {}: {} given, {} expected"
                             .format(parameter_values, len(parameter_values), parameter_count))
                      raise ValueError(msg)
                  self.connection.write(messages.Bind(portal_name, self.prepared_name,
                                               parameter_values, parameter_type_oids))
                  self.connection.write(messages.Execute(portal_name, 0))
              self.connection.write(messages.Sync())
          except Exception as e:
              self._logger.error(str(e))
              # the server will not send anything until we issue a sync
              self.connection.write(messages.Sync())
              self._message = self.connection.read_message()
              raise
  
          self.connection.write(messages.Flush())
  
          # Read expected message: BindComplete
          self.connection.read_expected_message(messages.BindComplete)
  
          self._message = self.connection.read_message()
          if isinstance(self._message, messages.ErrorResponse):
              raise errors.QueryError.from_error_response(self._message, self.prepared_sql)
docs: Send multiple statement parameter sets to the server using the extended
          query protocol. The server would bind and execute each set of parameter
          values.
  
          This function should not be called without first calling _prepare() to
          prepare a statement.