def iam_path(path):
    if (len(path) > 512):
        raise ValueError('IAM path %s may not exceed 512 characters', path)
    iam_path_re = compile('^\\/.*\\/$|^\\/$')
    if (not iam_path_re.match(path)):
        raise ValueError(('%s is not a valid iam path name' % path))
    return path
def iam_path(path):
    if (len(path) > 512):
        raise ValueError('IAM path %s may not exceed 512 characters', path)
    iam_path_re = compile('^\\/.*\\/$|^\\/$')
    if (not iam_path_re.match(path)):
        raise ValueError(('%s is not a valid iam path name' % path))
    return path