def get_code(self, owner):
    if (self.availability_check is not None):
        self.availability_check()
    if self.dynamic:
        return self._code(owner)
    else:
        return self._code
def get_code(self, owner):
    if (self.availability_check is not None):
        self.availability_check()
    if self.dynamic:
        return self._code(owner)
    else:
        return self._code