code: def WriteClientMetadata(self,
                            client_id,
                            certificate=None,
                            fleetspeak_enabled=None,
                            first_seen=None,
                            last_ping=None,
                            last_clock=None,
                            last_ip=None,
                            last_foreman=None):
      
      md = {}
      if certificate is not None:
        md["certificate"] = certificate
  
      if fleetspeak_enabled is not None:
        md["fleetspeak_enabled"] = fleetspeak_enabled
  
      if first_seen is not None:
        md["first_seen"] = first_seen
  
      if last_ping is not None:
        md["ping"] = last_ping
  
      if last_clock is not None:
        md["clock"] = last_clock
  
      if last_ip is not None:
        md["ip"] = last_ip
  
      if last_foreman is not None:
        md["last_foreman_time"] = last_foreman
  
      if not md:
        raise ValueError("NOOP write.")
  
      self.metadatas.setdefault(client_id, {}).update(md)
docs: Write metadata about the client.