hooks – Undefined function ‘entity_metadata_wrapper’ () in Drupal 9

in my custom module i found this error when i tried this code

function sun_blogs_views_pre_render(&$view) {

  if($view->name === 'blog_listing') {
    //general listing...
    if($view->current_display === 'page') {
      //lets get rid of the 'home' crumb
      Drupal::service('views.breadcrumb')->setBreadcrumb(array());
    }

    //category listing...
    if($view->current_display === 'page_1') {
      $title = '';
      if(isset($view->argument('tid'))) {
        $term = DrupaltaxonomyEntityTerm::load($view->argument('tid')->value(0));
        $title = $term->name;
      }
      $breadcrumbs = array(
        Drupal::service('link_generator')->generate(t('Blog'), 'blog'),
        $title
      );
      Drupal::service('views.breadcrumb')->setBreadcrumb($breadcrumbs);
    }
    //author listing...
    if($view->current_display === 'page_2') {
      $name = '';
      if(isset($view->argument('nid'))) {
        $nid = $view->argument('nid')->argument;
        if(is_numeric($nid)) {
          $node = DrupalnodeEntityNode::load($nid);
          $name = $node->title;
        }
      }
      $breadcrumbs = array(
        Drupal::service('link_generator')->generate(t('Blog'), 'blog'),
        $name
      );
      $view->description = $name;
      if(isset($node)) {
        $wrapper = entity_metadata_wrapper('node', $node);
        $title = $wrapper->field_job_title->value();
        if(strlen($title)) {
          $view->description .= ' - '  . $title;
        }
      }
      Drupal::service('views.breadcrumb')->setBreadcrumb($breadcrumbs);
    }

how to use it ,pl help me with it .