def string_annotation(typ, default):
try:<EOL><INDENT>type_string = (<EOL>f"<STR_LIT>"<EOL>if typ.__module__ == "<STR_LIT>"<EOL>else f"<STR_LIT>"<EOL>)<EOL><DEDENT>except AttributeError:<EOL><INDENT>type_string = f"<STR_LIT>"<EOL><DEDENT>if default is None:<EOL><INDENT>type_string = f"<STR_LIT>"<EOL><DEDENT>elif default == inspect._empty:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>type_string = f"<STR_LIT>"<EOL><DEDENT>return type_string<EOL>
Construct a string representation of a type annotation.

Parameters
----------
typ : type
    Type to turn into a string
default : any
    Default value (if any) of the type

Returns
-------
str
    String version of the type annotation