code: def availableRoles(self):
          '''
          Some instructors only offer private lessons for certain roles, so we should only allow booking
          for the roles that have been selected for the instructor.
          '''
          if not hasattr(self.instructor,'instructorprivatelessondetails'):
              return []
          return [
              [x.id,x.name] for x in
              self.instructor.instructorprivatelessondetails.roles.all()
          f availableRoles(self):
          '''
          Some instructors only offer private lessons for certain roles, so we should only allow booking
          for the roles that have been selected for the instructor.
          '''
          if not hasattr(self.instructor,'instructorprivatelessondetails'):
              return []
          return [
              [x.id,x.name] for x in
              self.instructor.instructorprivatelessondetails.roles.all()
          ]
docs: Some instructors only offer private lessons for certain roles, so we should only allow booking
          for the roles that have been selected for the instructor.