code: private function findExistingManufacturer(Manufacturer $manufacturer)
      {
          $result = $this->resource->getList(0, 1, [
              'supplier.name' => $manufacturer->getName(),
          ]);
  
          if (0 === count($result['data'])) {
              return null;
          }
  
          return array_shift($result['data']);
      }
docs: @param Manufacturer $manufacturer
  
  @return null|array