def from_jd(jd: float, fmt: str = '<STR_LIT>') -> datetime:
jd, jdf = __from_format(jd, fmt)<EOL>l = jd+<NUM_LIT><EOL>n = <NUM_LIT:4>*l//<NUM_LIT><EOL>l = l-(<NUM_LIT>*n+<NUM_LIT:3>)//<NUM_LIT:4><EOL>i = <NUM_LIT>*(l+<NUM_LIT:1>)//<NUM_LIT><EOL>l = l-<NUM_LIT>*i//<NUM_LIT:4>+<NUM_LIT><EOL>j = <NUM_LIT>*l//<NUM_LIT><EOL>k = l-<NUM_LIT>*j//<NUM_LIT><EOL>l = j//<NUM_LIT:11><EOL>j = j+<NUM_LIT:2>-<NUM_LIT:12>*l<EOL>i = <NUM_LIT:100>*(n-<NUM_LIT>)+i+l<EOL>year = int(i)<EOL>month = int(j)<EOL>day = int(k)<EOL>frac_component = int(jdf * (<NUM_LIT>*<NUM_LIT>*<NUM_LIT>))<EOL>hours = int(frac_component // (<NUM_LIT>*<NUM_LIT>))<EOL>frac_component -= hours * <NUM_LIT>*<NUM_LIT><EOL>minutes = int(frac_component // (<NUM_LIT>*<NUM_LIT>))<EOL>frac_component -= minutes * <NUM_LIT>*<NUM_LIT><EOL>seconds = int(frac_component // <NUM_LIT>)<EOL>frac_component -= seconds*<NUM_LIT><EOL>frac_component = int(frac_component)<EOL>dt = datetime(year=year, month=month, day=day,<EOL>hour=hours, minute=minutes, second=seconds, microsecond=frac_component)<EOL>return dt<EOL>
Converts a Julian Date to a datetime object.
Algorithm is from Fliegel and van Flandern (1968)

Parameters
----------
jd: float
    Julian Date as type specified in the string fmt

fmt: str

Returns
-------
dt: datetime