code: @Override
      public Object[][] getDataByKeys(String[] keys) {
          logger.entering(Arrays.toString(keys));
  
          InputStream inputStream = resource.getInputStream();
          Yaml yaml = constructYaml(resource.getCls());
  
          LinkedHashMap<?, ?> map = (LinkedHashMap<?, ?>) yaml.load(inputStream);
  
          Object[][] objArray = DataProviderHelper.getDataByKeys(map, keys);
  
          logger.exiting((Object[]) objArray);
          return objArray;
      }
docs: Gets yaml data by key identifiers. Only compatible with a yaml file formatted to return a map. <br>
  <br>
  YAML file example:
  
  <pre>
  test1:
  name: 1
  email: user1@paypal.com
  userId: 10686626
  test2:
  name: 2
  email: user2@paypal.com
  userId: 10686627
  </pre>
  
  @param keys
  A String array that represents the keys.
  
  @return Object[][] two dimensional object to be used with TestNG DataProvider