code: def default_photo(self):
          
          preferred = self.preferred_photo
          if preferred is not None:
              return preferred.binary
  
          if preferred is None:
              if self.user_type == "teacher":
                  current_grade = 12
              else:
                  current_grade = int(self.grade)
                  if current_grade > 12:
                      current_grade = 12
              for i in reversed(range(9, current_grade + 1)):
                  data = None
                  if self.photos.filter(grade_number=i).exists():
                      data = self.photos.filter(grade_number=i).first().binary
                  if data:
                      return data
docs: Returns default photo (in binary) that should be used
  
          Returns:
              Binary data