<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def elevation(dataset, low_point=None, high_point=None, scalar_range=None, preference='point', set_active=True):
 """Generate scalar values on a dataset. The scalar values lie within a user specified range, and are generated by computing a projection of each dataset point onto a line. The line can be oriented arbitrarily. A typical example is to generate scalars based on elevation or height above a plane. Parameters low_point : tuple(float), optional The low point of the projection line in 3D space. Default is bottom center of the dataset. Otherwise pass a length 3 tuple(float). high_point : tuple(float), optional The high point of the projection line in 3D space. Default is top center of the dataset. Otherwise pass a length 3 tuple(float). scalar_range : str or tuple(float), optional The scalar range to project to the low and high points on the line that will be mapped to the dataset. If None given, the values will be computed from the elevation (Z component) range between the high and low points. Min and max of a range can be given as a length 2 tuple(float). If ``str`` name of scalara array present in the dataset given, the valid range of that array will be used. preference : str, optional When a scalar name is specified for ``scalar_range``, this is the perfered scalar type to search for in the dataset. Must be either 'point' or 'cell'. set_active : bool, optional A boolean flag on whethter or not to set the new `Elevation` scalar as the active scalar array on the output dataset. Warning ------- This will create a scalar array named `Elevation` on the point data of the input dataset and overasdf write an array named `Elevation` if present. """

        # Fix the projection line:
        if low_point is None:
            low_point = list(dataset.center)
            low_point[2] = dataset.bounds[4]
        if high_point is None:
            high_point = list(dataset.center)
            high_point[2] = dataset.bounds[5]
        # Fix scalar_range:
        if scalar_range is None:
            scalar_range = (low_point[2], high_point[2])
        elif isinstance(scalar_range, str):
            scalar_range = dataset.get_data_range(arr=scalar_range, preference=preference)
        elif isinstance(scalar_range, collections.Iterable):
            if len(scalar_range) != 2:
                raise AssertionError('scalar_range must have a length of two defining the min and max')
        else:
            raise RuntimeError('scalar_range argument ({}) not understood.'.format(type(scalar_range)))
        # Construct the filter
        alg = vtk.vtkElevationFilter()
        alg.SetInputDataObject(dataset)
        # Set the parameters
        alg.SetScalarRange(scalar_range)
        alg.SetLowPoint(low_point)
        alg.SetHighPoint(high_point)
        alg.Update()
        # Decide on updating active scalar array
        name = 'Elevation' # Note that this is added to the PointData
        if not set_active:
            name = None
        return _get_output(alg, active_scalar=name, active_scalar_field='point')