def _get_fill_value(dtype, fill_value=None, fill_value_typ=None):
if fill_value is not None:<EOL><INDENT>return fill_value<EOL><DEDENT>if _na_ok_dtype(dtype):<EOL><INDENT>if fill_value_typ is None:<EOL><INDENT>return np.nan<EOL><DEDENT>else:<EOL><INDENT>if fill_value_typ == '<STR_LIT>':<EOL><INDENT>return np.inf<EOL><DEDENT>else:<EOL><INDENT>return -np.inf<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>if fill_value_typ is None:<EOL><INDENT>return tslibs.iNaT<EOL><DEDENT>else:<EOL><INDENT>if fill_value_typ == '<STR_LIT>':<EOL><INDENT>return _int64_max<EOL><DEDENT>else:<EOL><INDENT>return tslibs.iNaT<EOL><DEDENT><DEDENT><DEDENT>
return the correct fill value for the dtype of the values