<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ex_literal(val):
 """An int, float, long, bool, string, or None literal with the given value. """

    if val is None:
        return ast.Name('None', ast.Load())
    elif isinstance(val, int):
        return ast.Num(val)
    elif isinstance(val, bool):
        return ast.Name(bytes(val), ast.Load())
    elif isinstance(val, str):
        return ast.Str(val)
    raise TypeError(u'no literal for {0}'.format(type(val)))