class_docstr: `HD1K <http://hci-benchmark.iwr.uni-heidelberg.de/>`__ dataset for optical flow.
  
  The dataset is expected to have the following structure: ::
  
      root
          hd1k
              hd1k_challenge
                  image_2
              hd1k_flow_gt
                  flow_occ
              hd1k_input
                  image_2
  
  Args:
      root (string): Root directory of the HD1K Dataset.
      split (string, optional): The dataset split, either "train" (default) or "test"
      transforms (callable, optional): A function/transform that takes in
          ``img1, img2, flow, valid_flow_mask`` and returns a transformed version.
class_docstr_tok: ["`","HD1K","<","http",":","\/\/hci-benchmark.iwr.uni-heidelberg.de\/",">","`","__","dataset","for","optical","flow",".","The","dataset","is","expected","to","have","the","following","structure",":",":",":","root","hd1k","hd1k_challenge","image_2","hd1k_flow_gt","flow_occ","hd1k_input","image_2","Args",":","root","(","string",")",":","Root","directory","of","the","HD1K","Dataset",".","split","(","string",",","optional",")",":","The","dataset","split",",","either","``","train","''","(","default",")","or","``","test","''","transforms","(","callable",",","optional",")",":","A","function\/transform","that","takes","in","``","img1",",","img2",",","flow",",","valid_flow_mask","``","and","returns","a","transformed","version","."]
code: def _read_flow(self, file_name: str) -> Tuple[np.ndarray, np.ndarray]:
      return _read_16bits_png_with_flow_and_valid_mask(file_name)
  
imports: import itertools
  import os
  from abc import ABC, abstractmethod
  from glob import glob
  from pathlib import Path
  from typing import Callable, List, Optional, Tuple, Union
  import numpy
  import torch
  from PIL import Image
  from ..io.image import _read_png_16
  from .utils import _read_pfm, verify_str_arg
  from .vision import VisionDataset
label_desc: Use image node_id 2 for calling the HD1K obj's underlying member method code with example usage: obj._read_flow(file_name) and returns: _read_16bits_png_with_flow_and_valid_mask