def _dtype_to_stata_type_117(dtype, column, force_strl):
<EOL>if force_strl:<EOL><INDENT>return <NUM_LIT><EOL><DEDENT>if dtype.type == np.object_:  <EOL><INDENT>itemsize = max_len_string_array(ensure_object(column.values))<EOL>itemsize = max(itemsize, <NUM_LIT:1>)<EOL>if itemsize <= <NUM_LIT>:<EOL><INDENT>return itemsize<EOL><DEDENT>return <NUM_LIT><EOL><DEDENT>elif dtype == np.float64:<EOL><INDENT>return <NUM_LIT><EOL><DEDENT>elif dtype == np.float32:<EOL><INDENT>return <NUM_LIT><EOL><DEDENT>elif dtype == np.int32:<EOL><INDENT>return <NUM_LIT><EOL><DEDENT>elif dtype == np.int16:<EOL><INDENT>return <NUM_LIT><EOL><DEDENT>elif dtype == np.int8:<EOL><INDENT>return <NUM_LIT><EOL><DEDENT>else:  <EOL><INDENT>raise NotImplementedError("<STR_LIT>" % dtype)<EOL><DEDENT>
Converts dtype types to stata types. Returns the byte of the given ordinal.
See TYPE_MAP and comments for an explanation. This is also explained in
the dta spec.
1 - 2045 are strings of this length
            Pandas    Stata
32768 - for object    strL
65526 - for int8      byte
65527 - for int16     int
65528 - for int32     long
65529 - for float32   float
65530 - for double    double

If there are dates to convert, then dtype will already have the correct
type inserted.