@classmethod
    def _process_points(cls, points):
        """
        Format `points` parameter.

        Input:
            a value or (timestamp, value) pair or a list of value or (timestamp, value) pairs

        Returns:
            list of (timestamp, float value) pairs

        """
        now = time.time()
        points_lst = points if isinstance(points, list) else [points]

        def rec_parse(points_lst):
            """
            Recursively parse a list of values or a list of (timestamp, value) pairs to a list of
            (timestamp, `float` value) pairs.
            """
            try:
                if not points_lst:
                    return []

                point = points_lst.pop()
                timestamp = now if isinstance(point, Number) else point[0]
                value = float(point) if isinstance(point, Number) else float(point[1])

                point = [(timestamp, value)]

                return point + rec_parse(points_lst)

            except __HOLE__ as e:
                raise TypeError(
                    u"{0}: "
                    "`points` parameter must use real numerical values.".format(e)
                )

            except IndexError as e:
                raise IndexError(
                    u"{0}: "
                    u"`points` must be a list of values or "
                    u"a list of (timestamp, value) pairs".format(e)
                )

        return rec_parse(points_lst)
dataset/ETHPy150Open DataDog/datadogpy/datadog/api/metrics.py/Metric._process_points