'Returns a DiskFile instance for an object at the given
object_hash. Just in case someone thinks of refactoring, be
sure DiskFileDeleted is *not* raised, but the DiskFile
instance representing the tombstoned object is returned
instead.
:param device: name of target device
:param partition: partition on the device in which the object lives
:param object_hash: the hash of an object path
:param policy: the StoragePolicy instance
:raises DiskFileNotExist: if the object does not exist
:returns: an instance of BaseDiskFile'

def get_diskfile_from_hash(self, device, partition, object_hash, policy, **kwargs):

    dev_path = self.get_dev_path(device)
    if (not dev_path):
        raise DiskFileDeviceUnavailable()
    object_path = os.path.join(dev_path, get_data_dir(policy), str(partition), object_hash[(-3):], object_hash)
    try:
        filenames = self.cleanup_ondisk_files(object_path)['files']
    except OSError as err:
        if (err.errno == errno.ENOTDIR):
            quar_path = self.quarantine_renamer(dev_path, object_path)
            logging.exception(_('Quarantined    %(object_path)s    to    %(quar_path)s    because    it    is    not    a    directory'), {'object_path': object_path, 'quar_path': quar_path})
            raise DiskFileNotExist()
        if (err.errno != errno.ENOENT):
            raise
        raise DiskFileNotExist()
    if (not filenames):
        raise DiskFileNotExist()
    try:
        metadata = read_metadata(os.path.join(object_path, filenames[(-1)]))
    except EOFError:
        raise DiskFileNotExist()
    try:
        (account, container, obj) = split_path(metadata.get('name', ''), 3, 3, True)
    except ValueError:
        raise DiskFileNotExist()
    return self.diskfile_cls(self, dev_path, partition, account, container, obj, policy=policy, **kwargs)
