AccessDirection (@NotNull PyFunction function) { final Property property = function.getProperty(); if (property != null) { if (property.getGetter().valueOrNull() == function) { return AccessDirection.READ; } if (property.getSetter().valueOrNull() == function) { return AccessDirection.WRITE; } else if (property.getDeleter().valueOrNull() == function) { return AccessDirection.DELETE; } } return AccessDirection.READ; }