Return the magnet at the corresponding index returns None is the magnet is None Raise error if the hole doesn’t have a magnet for the corresponding index
self (Hole) – A Hole object
index (int) – Index of the magnet to return
magnet – Magnet object (or None)
Magnet