code: def _call_scope(self, scope, *args, **kwargs):
          
          query = self.get_query()
  
          # We will keep track of how many wheres are on the query before running the
          # scope so that we can properly group the added scope constraints in the
          # query as their own isolated nested where statement and avoid issues.
          original_where_count = len(query.wheres)
  
          result = getattr(self._model, scope)(self, *args, **kwargs)
  
          if self._should_nest_wheres_for_scope(query, original_where_count):
              self._nest_wheres_for_scope(
                  query, [0, original_where_count, len(query.wheres)]
              )
  
          return result or self
docs: Call the given model scope.
  
          :param scope: The scope to call
          :type scope: str