anchor.diff:      overlapping_blocks => blocks(),
       count => non_neg_integer(),
       skip_local => boolean()}.
  +% Definition of blocks sequence list - see get_overlapping_blocks_sequence/2 funstion doc
  +-type blocks_sequences() :: [{ConsistentBlocksRange :: blocks(), OverlappingBlocks :: blocks()}].
  +-type getting_sequence_block_result() :: #{
  +    action := finish | start_new_sequence,
  +    remaining_blocks_to_split := blocks(),
  +    blocks_to_split_sequence := blocks(),
  +    existing_blocks_overlapping_with_sequenc := blocks()
  +}.
   
   -export_type([block/0, blocks/0, blocks_tree/0, stored_blocks/0, get_doc_opts/0]).
   
  
positive.code:     set_blocks/2, set_final_blocks/2, update_blocks/2, clear_blocks/2]).
  %% Blocks API
  -export([get_location_size/2, get_blocks_range/1, get_blocks_range/2]).
  
  %%%===================================================================
  %%% Location getters/setters
  
negative.code: %% element is list of blocks overlapping with blocks returned in the first element of the tuple.
  %% The lists from first elements of the tuple sum to input list. The input list is split using algorithm
  %% that finds sequences of blocks that are close one to another that means that there are no more
  %% than ?MAX_HOLE existing blocks between two adjacent blocks in request.
  %% @end
  %%-------------------------------------------------------------------
  -spec get_overlapping_blocks_sequence(file_location:id(), blocks()) -> blocks_sequences().
  get_overlapping_blocks_sequence(_Key, []) ->
      [];
  get_overlapping_blocks_sequence(Key, [#file_block{offset = Offset} | _] = BlocksToSplitIntoSequences) ->
      HoleSizeLimit = ?MAX_HOLE + 1,
      ExistingBlocksTree = fslogic_cache:get_blocks_tree(Key),
      ExistingBlocksIterator = gb_sets:iterator_from(#file_block{offset = Offset, size = 0}, ExistingBlocksTree),
      Ans = get_block_seqences(ExistingBlocksTree, ExistingBlocksIterator, HoleSizeLimit, BlocksToSplitIntoSequences),
  
      BlocksToUse = lists:map(fun({_BlockSequence, BlocksOverlappingWithSequence}) ->
          BlocksOverlappingWithSequence
      end, Ans),
      fslogic_cache:use_blocks(Key, BlocksToUse),
      Ans.
  
  %%verify(Key, OverlappingBlocks) ->
  %%    case OverlappingBlocks of
  %%        [] ->
  %%            [];
  %%        [#file_block{offset = Offset1, size = Size1} | OverlappingBlocksTail] ->
  %%            Blocks = fslogic_cache:get_blocks_tree(Key),
  %%            {Start, Stop} = lists:foldl(fun(#file_block{offset = Offset, size = Size},
  %%                {#file_block{offset = TmpO} = TmpStart, TmpStop}) ->
  %%                Start2 = case Offset < TmpO of
  %%                    true -> #file_block{offset = Offset, size = 0};
  %%                    _ -> TmpStart
  %%                end,
  %%                End = Offset + Size,
  %%                Stop2 = case End > TmpStop of
  %%                    true -> End;
  %%                    _ -> TmpStop
  %%                end,
  %%                {Start2, Stop2}
  %%            end, {#file_block{offset = Offset1, size = 0}, Offset1 + Size1}, OverlappingBlocksTail),
  %%            Iter = gb_sets:iterator_from(Start, Blocks),
  %%            Ans = get_block_while(Iter, Stop),
  %%            Ans2 = [{OverlappingBlocks, Ans}],
  %%            fslogic_cache:use_blocks(Key, [Ans]),
  %%            Ans2
  %%    end.
  
  %%-------------------------------------------------------------------
  %% @doc
  