def translate_command(val):
    '''
    Input should either be a single string, or a list of strings. This is used
    for the two args that deal with commands ("command" and "entrypoint").
    '''
    if isinstance(val, six.string_types):
        return val
    elif isinstance(val, list):
        for idx in range(len(val)):
            if not isinstance(val[idx], six.string_types):
                val[idx] = six.text_type(val[idx])
    else:
        # Make sure we have a string
        val = six.text_type(val)
    return val
Input should either be a single string, or a list of strings. This is used
    for the two args that deal with commands ("command" and "entrypoint").