hasattr checks as there're differences between
Event subclasses and other
print(ly_expression()) in test for printing through default
Output_printer as some classes don't have overridden
Also, changed commented `self.pitch = None` to the `self.pitch = Pitch()` inside of `Note.__init__()` as somitimes it is used by printer.
P.S. I hope to find the way to use this python library within other python repositories, maybe also with
python-ly part of frescobaldi project if maintainers allow integrating this library to their project.