code: def _command(self, sock_info, command, slave_ok=False, value=1, check=True,
                   allowable_errors=None, read_preference=ReadPreference.PRIMARY,
                   codec_options=DEFAULT_CODEC_OPTIONS,
                   write_concern=None,
                   parse_write_concern_error=False, session=None, **kwargs):
          
          if isinstance(command, string_type):
              command = SON([(command, value)])
  
          command.update(kwargs)
          with self.__client._tmp_session(session) as s:
              return sock_info.command(
                  self.__name,
                  command,
                  slave_ok,
                  read_preference,
                  codec_options,
                  check,
                  allowable_errors,
                  write_concern=write_concern,
                  parse_write_concern_error=parse_write_concern_error,
                  session=s,
                  client=self.__client)
docs: Internal command helper.