def METHOD_NAME(self, item):
    if isinstance(item, BlobItemInternal):
        file_props = get_deleted_path_properties_from_generated_code(item)
        file_props.file_system = self.container
        return file_props
    if isinstance(item, GenBlobPrefix):
        return DirectoryPrefix(
            container=self.container,
            prefix=item.name,
            results_per_page=self.results_per_page,
            location_mode=self.location_mode)
    return item