in modular_cli/service/utils.py [0:0]
def find_token_meta(commands_meta, specified_tokens):
if not specified_tokens:
return commands_meta
current_meta = commands_meta
for token in specified_tokens:
token_meta = current_meta.get(token)
if not token_meta:
raise ModularCliBadRequestException(
f'Failed to find specified command: {token}')
current_meta = token_meta.get('body')
return current_meta