@staticmethod<EOL><INDENT>def get_key(key, data_structure):<DEDENT>
if key == '<STR_LIT:/>':<EOL><INDENT>return data_structure<EOL><DEDENT>path = key.split('<STR_LIT:/>')<EOL>path[<NUM_LIT:0>] or path.pop(<NUM_LIT:0>)<EOL>current_value = data_structure<EOL>while path:<EOL><INDENT>current_key = path.pop(<NUM_LIT:0>)<EOL>try:<EOL><INDENT>current_key = int(current_key)<EOL><DEDENT>except ValueError:<EOL><INDENT>pass<EOL><DEDENT>try:<EOL><INDENT>current_value = current_value[current_key]<EOL><DEDENT>except (KeyError, IndexError):<EOL><INDENT>LOGGER.debug('<STR_LIT>'.format(key))<EOL>return None<EOL><DEDENT><DEDENT>return current_value<EOL>
Helper method for extracting values from a nested data structure.

Args:
    key (str): The path to the vales (a series of keys and indexes
        separated by '/')
    data_structure (dict or list): The data structure from which the
        value will be extracted.

Returns:
    str: The values associated with key