def load(self, fields=None, pipe=None):
if fields is None:<EOL><INDENT>fields = self.default_fields<EOL><DEDENT>if fields == '<STR_LIT:all>':<EOL><INDENT>return self._load_all(pipe=pipe)<EOL><DEDENT>if fields == '<STR_LIT>':<EOL><INDENT>fields = [k for k in self.fields.keys()]<EOL><DEDENT>if not fields:<EOL><INDENT>return<EOL><DEDENT>with self._pipe(pipe) as pipe:<EOL><INDENT>ref = self.core(pipe=pipe).hmget(self.key, fields)<EOL>def cb():<EOL><INDENT>"""<STR_LIT>"""<EOL>for i, v in enumerate(ref.result):<EOL><INDENT>k = fields[i]<EOL>if v is None:<EOL><INDENT>self._data.pop(k, None)<EOL><DEDENT>elif k != self.key_name:<EOL><INDENT>self._data[k] = v<EOL><DEDENT><DEDENT><DEDENT>pipe.on_execute(cb)<EOL><DEDENT>
Load data from redis.
Allows you to specify what fields to load.
This method is also called implicitly from the constructor.

:param fields: 'all', 'defined', or array of field names
:param pipe: Pipeline(), NestedPipeline() or None
:return: None