code: def pickle_dumps(self, protocol=None):
          
          strio = StringIO()
          pmg_pickle_dump(self, strio,
                          protocol=self.pickle_protocol if protocol is None
                          else protocol)
          return strio.getvalue()
docs: Return a string with the pickle representation.
          `protocol` selects the pickle protocol. self.pickle_protocol is
           used if `protocol` is None