@classmethod
def ensure_frequency(cls, frequency):
    """Ensure the given args is AsyncFrequency.

        :param frequency: args to create a AsyncFrequency instance.
        :type frequency: AsyncFrequency / dict / list / tuple
        :return: AsyncFrequency instance
        :rtype: AsyncFrequency
        """
    if isinstance(frequency, cls):
        return frequency
    elif isinstance(frequency, dict):
        return cls(**frequency)
    else:
        return cls(*frequency)
