An AttributeError occurs if a function does not exist in an imported module. Fill in the missing code to handle AttributeErrors gracefully and generate an error if other types of exceptions occur.
import my_lib
try:
result = my_lib.magic()
SOLUTION:
print('No magic() function in my_lib.')