code: protected function backtraceRemoveInternal($backtrace)
      {
          $count = \count($backtrace);
          for ($i = $count - 1; $i > 0; $i--) {
              $frame = $backtrace[$i];
              if (isset($frame['class']) && \strpos($frame['class'], __NAMESPACE__) === 0) {
                  break;
              }
          }
          $i++;
          return \array_slice($backtrace, $i);
      }
docs: Remove internal frames from backtrace
  
  @param array $backtrace backtrace
  
  @return array