code: def _check_read(self, fd, nbytes):  # type: (...) -> bytes
          
          result = fd.read(nbytes)
  
          if (not result and nbytes > 0) or len(result) != nbytes:
              raise InvalidZoneinfoFile(
                  "Expected {} bytes reading {}, "
                  "but got {}".format(nbytes, fd.name, len(result) if result else 0)
              )
  
          if PY2:
              return bytearray(result)
  
          return result
docs: Reads the given number of bytes from the given file
          and checks that the correct number of bytes could be read.