original_string: public static function fetch($input): array
      {
          $output = [];
          $map = [];
          foreach ($input as $i => $row) {
              $model = '';
              foreach ($row as $key => $value) {
                  if (strpos($key, '__') === 0) {
                      $model = substr($key, 2);
                      continue;
                  }
                  $map[$i][$model][$key] = $value;
              }
              foreach ($map[$i] as $model => &$data) {
                  $data = self::createRow($model, $data);
              }
              $output[] = $map;
          }
          return $output;
      }
code: public static function fetch($input): array
      {
          $output = [];
          $map = [];
          foreach ($input as $i => $row) {
              $model = '';
              foreach ($row as $key => $value) {
                  if (strpos($key, '__') === 0) {
                      $model = substr($key, 2);
                      continue;
                  }
                  $map[$i][$model][$key] = $value;
              }
              foreach ($map[$i] as $model => &$data) {
                  $data = self::createRow($model, $data);
              }
              $output[] = $map;
          }
          return $output;
      }
code_tokens: public static function fetch ( $ input ) : array { $ output = [ ] ; $ map = [ ] ; foreach ( $ input as $ i => $ row ) { $ model = '' ; foreach ( $ row as $ key => $ value ) { if ( strpos ( $ key , '__' ) === 0 ) { $ model = substr ( $ key , 2 ) ; continue ; } $ map [ $ i ] [ $ model ] [ $ key ] = $ value ; } foreach ( $ map [ $ i ] as $ model => & $ data ) { $ data = self :: createRow ( $ model , $ data ) ; } $ output [ ] = $ map ; } return $ output ; }
docstring: Fetch by Divider
  
  @param  array $input
  
  @return array
  @throws Exception\RelationNotFoundException
docstring_tokens: Fetch by Divider