def is_one2one(fmt):
data = _generate_data_for_format(fmt)<EOL>if data is None:<EOL><INDENT>return False<EOL><DEDENT>stri = compose(fmt, data)<EOL>data2 = parse(fmt, stri)<EOL>if len(data) != len(data2):<EOL><INDENT>return False<EOL><DEDENT>for key in data:<EOL><INDENT>if key not in data2:<EOL><INDENT>return False<EOL><DEDENT>if data2[key] != data[key]:<EOL><INDENT>return False<EOL><DEDENT><DEDENT>return True<EOL>
Runs a check to evaluate if the format string has a
one to one correspondence.  I.e. that successive composing and
parsing opperations will result in the original data.
In other words, that input data maps to a string,
which then maps back to the original data without any change
or loss in information.

Note: This test only applies to sensible usage of the format string.
If string or numeric data is causes overflow, e.g. 
if composing "abcd" into {3s}, one to one correspondence will always 
be broken in such cases. This of course also applies to precision
losses when using  datetime data.