def ingest(self, token, endpoint=None, timeout=None, compress=None):
from . import ingest<EOL>if ingest.sf_pbuf:<EOL><INDENT>client = ingest.ProtoBufSignalFxIngestClient<EOL><DEDENT>else:<EOL><INDENT>_logger.warn('<STR_LIT>'<EOL>'<STR_LIT>')<EOL>client = ingest.JsonSignalFxIngestClient<EOL><DEDENT>compress = compress if compress is not None else self._compress<EOL>return client(<EOL>token=token,<EOL>endpoint=endpoint or self._ingest_endpoint,<EOL>timeout=timeout or self._timeout,<EOL>compress=compress)<EOL>
Obtain a datapoint and event ingest client.