public function populateMediaField($field_name) {
    $item = $this->item;
    $assets = [];
    if (!empty($item[$field_name])) {
      $data = $this->loadDataArray('media_image');

      foreach ($item[$field_name] as $k => $value) {
        if (!empty($data[$value])) {
          $name = $data[$value]['name'];
          $entities = $this->loadEntitiesByProperties('media', ['name' => $name]);

          foreach ($entities as $entity) {
            $assets[] = ['target_id' => $entity->id()];
          }
        }
      }
      return $assets;
    }
  }