'Queries datadog for a specific metric, potentially with some function applied to it
and returns the results.
:param query: The datadog query to execute (see datadog docs)
:type query: string
:param from_seconds_ago: How many seconds ago to start querying for.
:type from_seconds_ago: int
:param to_seconds_ago: Up to how many seconds ago to query for.
:type to_seconds_ago: int'

def query_metric(self, query, from_seconds_ago, to_seconds_ago):

    now = int(time.time())
    response = api.Metric.query(start=(now - from_seconds_ago), end=(now - to_seconds_ago), query=query)
    self.validate_response(response)
    return response
