def METHOD_NAME(use_shape, max_translate_abs=None, max_translate_rel=None,
                          default_translate_abs=250, default_translate_rel=1.):
    # if one passes DataNode (with shapes for instance), the error message would be very vague
    if not isinstance(use_shape, bool):
        raise Exception(f"The `use_shape` is a flag that should be set to either True or False, "
                        f"got {use_shape}.")
    if use_shape:
        if max_translate_abs is not None:
            raise Exception("The argument `max_translate_abs` cannot be used with image shapes. "
                            "You may use `max_translate_rel` instead.")
        if max_translate_rel is None:
            max_translate_rel = default_translate_rel
        return max_translate_hw(max_translate_rel)
    else:
        if max_translate_rel is not None:
            raise Exception("The argument `max_translate_rel` cannot be used without image shapes. "
                            "You may use `max_translate_abs` instead.")
        if max_translate_abs is None:
            max_translate_abs = default_translate_abs
        return max_translate_hw(max_translate_abs)