anchor.diff:  -spec delete(BlockValues :: block_state()) -> block_defn().
   
   delete({Config, Inputs, Outputs, Private}) ->
  -  % Unsubscribe from each subscription first
  +  % If MQTT client has been started
  +  % Unsubscribe from each subscription and then disconnect from MQTT client
     {ok, Client} = attrib_utils:get_value(Private, client),
  -  emqttc:disconnect(Client),
  +  case is_pid(Client) of
  +    true ->
  +      unsub_topics(Config, Client),
  +      emqttc:disconnect(Client);
  +    false -> ok 
  +  end,
     {Config, Inputs, Outputs}.
   
   
  
positive.code:       % Create subscribe topic config values, 
        % one topic string for each subscribed output value 
        Config1 = config_utils:resize_attribute_array_value(Config, 
                                        sub_topics, NumOfSubs, {"SubTopic"}),
        % Create subscribe outputs
        Outputs1 = output_utils:resize_attribute_array_value(BlockName, Outputs, 
                                    sub_outputs, NumOfSubs, {not_active, []}),
        % Return updated Config and Outputs attributes
        {ok, Config1, Outputs1};
      
  
negative.code:       % Create publish topic config values, 
        % one topic string for each published input value 
        Config1 = config_utils:resize_attribute_array_value(Config, 
                                                   pub_topics, NumOfPubs, {""}),
        % Create publish inputs
        Inputs1 = input_utils:resize_attribute_array_value(BlockName, Inputs, 
                                                   pub_inputs, NumOfPubs, {empty, ?EMPTY_LINK}),
        % Return updated Config and Inputs attributes
        {ok, Config1, Inputs1};
  
  