def _handle_sub_value(self, sub_value, handler_method):
<EOL>if isinstance(sub_value, string_types):<EOL><INDENT>sub_value = self._sub_all_refs(sub_value, handler_method)<EOL><DEDENT>elif isinstance(sub_value, list) and len(sub_value) > <NUM_LIT:0> and isinstance(sub_value[<NUM_LIT:0>], string_types):<EOL><INDENT>sub_value[<NUM_LIT:0>] = self._sub_all_refs(sub_value[<NUM_LIT:0>], handler_method)<EOL><DEDENT>return sub_value<EOL>
Generic method to handle value to Fn::Sub key. We are interested in parsing the ${} syntaxes inside
the string portion of the value.

:param sub_value: Value of the Sub function
:param handler_method: Method to be called on every occurrence of `${LogicalId}` structure within the string.
    Implementation could resolve and replace this structure with whatever they seem fit
:return: Resolved value of the Sub dictionary