def create_parameter(model, parameter_id, value, constant=True, units="dimensionless"):
    """
    Creates new parameter for libsbml.Model. It is not necessary to assign the
    function to a value. The parameter is automatically added to the input model
    outside of the function.

    Parameters
    ----------
    model : libsbml.Model
        Model for which species will be created.

    parameter_id : str
        Id for the new parameter.

    constant : {True, False}
        True if the new parameter can only be constant. And False if not.
        False does not mean that the parameter has to change but rather that
        it is allowed to.

    value : float
        Value of the parameter.

    units : str
        Units of the parameter.

    Returns
    -------
    parameter : libsbml.Parameter
        Parameter defined for the model.
    """

    parameter = model.createParameter()
    parameter.setId(parameter_id)
    parameter.setName(parameter_id)
    parameter.setConstant(constant)
    parameter.setValue(value)
    parameter.setUnits(units)

    return parameter