code: def add_key(self, ref, mode="shared"):
          
          if ref not in self.keys:
              response = self.request("client_add_key %s -%s" % (ref, mode))
              if "success" not in response:
                  return None
              self.keys.append(ref)
              return ref
docs: Add a key.
  
          (ref)
          Return key name or None on error