def classify_format(f):
l0, l1 = _get_two_lines(f)<EOL>if loader.glove.check_valid(l0, l1):<EOL><INDENT>return _glove<EOL><DEDENT>elif loader.word2vec_text.check_valid(l0, l1):<EOL><INDENT>return _word2vec_text<EOL><DEDENT>elif loader.word2vec_bin.check_valid(l0, l1):<EOL><INDENT>return _word2vec_bin<EOL><DEDENT>else:<EOL><INDENT>raise OSError(b"<STR_LIT>")<EOL><DEDENT>
Determine the format of word embedding file by their content. This operation
only looks at the first two lines and does not check the sanity of input
file.

Args:
    f (Filelike):

Returns:
    class