def METHOD_NAME(values):
    """Checks that the argument represents a tensor shape or a sequence of tensor shapes"""
    shapes = ast.literal_eval(values)
    if not is_sequence(shapes):
        raise argparse.ArgumentTypeError(
            '{!r}: must be a sequence'.format(shapes))
    if not all(is_sequence(shape) for shape in shapes):
        shapes = (shapes, )
    for shape in shapes:
        if not is_sequence(shape):
            raise argparse.ArgumentTypeError(
                '{!r}: must be a sequence'.format(shape))
        for value in shape:
            if not isinstance(value, int) or value < 0:
                raise argparse.ArgumentTypeError(
                    'Argument {!r} must be a positive integer'.format(value))
    return shapes