def METHOD_NAME(parameters, shape=None, dimensionless=False):
    parameter_list = []
    for name, value in parameters.items():
        if isinstance(value, larray):
            value.shape = shape
            if value.is_homogeneous:
                value = value.evaluate(simplify=True)
                if isinstance(value, Sequence):
                    value = value.value.tolist()
                elif isinstance(value, bool):
                    value = int(value)
            elif isinstance(value, random.RandomDistribution):
                rand_distr = value
                value = nineml.RandomDistributionComponent(
                    name="%s(%s)" % (rand_distr.name, ",".join(str(p)
                                                               for p in rand_distr.parameters)),
                    definition=nineml.Definition(random_distribution_url_map[rand_distr.name],
                                                 "random"),
                    parameters=METHOD_NAME(
                        map_random_distribution_parameters(rand_distr.name, rand_distr.parameters),
                        dimensionless=True))
            else:
                raise Exception("not supported")
        else:
            if isinstance(value, bool):
                value = int(value)
        if dimensionless:
            unit = "dimensionless"
        elif isinstance(value, str):
            unit = None
        else:
            unit = infer_units(name)
        parameter_list.append(nineml.Property(name, value, unit))
    return nineml.PropertySet(*parameter_list)