def METHOD_NAME(invoke_step, prereqs):
    """Given the invoke step dictionary i.e. steps of commands to run either
    in the chroot or on the host environment, get a list of command snippets
        invoke_dict: the value from the 'invoke' key
        workdir: If WORKDIR was set to anything, provide it here
        envs: If any environment variables were set, enter the key-value pairs
              here"""
    if 'container' in invoke_step.keys():
        snippet_list = invoke_step.get('container')
        # If environment variables exist, set them
        if prereqs.envs:
            for var in prereqs.envs:
                snippet_list.insert(
                    0, 'export ' + var.split('=')[0] + '=\"' + var.split('=')[1] + '\"')
        # If work_dir exist cd into it
        if prereqs.layer_workdir:
            snippet_list.insert(0, 'cd ' + prereqs.layer_workdir)
        return 'container', snippet_list
    if 'host' in invoke_step.keys():
        snippet_list = invoke_step.get('host')
        # we would expect to cd into the layer's host path
        snippet_list.insert(0, 'cd ' + prereqs.host_path)
        return 'host', snippet_list
    return '', []