def infer_slice(node, context=None):
args = node.args<EOL>if not <NUM_LIT:0> < len(args) <= <NUM_LIT:3>:<EOL><INDENT>raise UseInferenceDefault<EOL><DEDENT>infer_func = partial(helpers.safe_infer, context=context)<EOL>args = [infer_func(arg) for arg in args]<EOL>for arg in args:<EOL><INDENT>if not arg or arg is util.Uninferable:<EOL><INDENT>raise UseInferenceDefault<EOL><DEDENT>if not isinstance(arg, nodes.Const):<EOL><INDENT>raise UseInferenceDefault<EOL><DEDENT>if not isinstance(arg.value, (type(None), int)):<EOL><INDENT>raise UseInferenceDefault<EOL><DEDENT><DEDENT>if len(args) < <NUM_LIT:3>:<EOL><INDENT>args.extend([None] * (<NUM_LIT:3> - len(args)))<EOL><DEDENT>slice_node = nodes.Slice(<EOL>lineno=node.lineno, col_offset=node.col_offset, parent=node.parent<EOL>)<EOL>slice_node.postinit(*args)<EOL>return slice_node<EOL>
Understand `slice` calls.