@staticmethod
def _generate_dates(dates):
    """
        Generate and merge dates object
        :param dates: object with options for query, see doc
        :return: updated opts
        """
    default = {'from': '1h', 'to': None}
    if not dates:
        return default
    default.update(dates)
    return default
