def METHOD_NAME(self, line, point):
    """Using either the standard or next_generation_api"""
    try:
        line.add(point)
    except AttributeError:  # next_generation_api
        line.addPoint(point)
    except Exception:
        raise