def get_variation(variation_key, variations_dict, defaults_dict):
    """Convert a string to a tuple of integers.

    If the passed variation_key doesn't follow this pattern '0 100', it will
    return default values defined in defaults_dict.

    This is currently used for defining the variation data of the A/B
    experiment regarding the multi-steps form.
    """
    try:
        # We want to create a tuple of integers from a string containing
        # integers. Anything else should throw.
        rv = tuple(int(x) for x in variations_dict.get(variation_key)
                                                  .strip().split())
        if (len(rv) != 2):
            raise ValueError('The format is incorrect. Expected "{int} {int}"')
    except Exception as e:
        print('Something went wrong with AB test configuration: {0}'.format(e))
        print('Falling back to default values.')
        rv = defaults_dict.get(variation_key)
    return rv