human
Complete this python program:
def get_schema_for_resource_parameters(parameters_schema, allow_additional_properties=False):
assistant
#Here is the Python code you requested.

    """Dynamically construct JSON schema for the provided resource from the parameters metadata.
    """
    def normalize(x):
        return {k: (v if v else SCHEMA_ANY_TYPE) for (k, v) in six.iteritems(x)}
    schema = {}
    properties = {}
    properties.update(normalize(parameters_schema))
    if properties:
        schema['type'] = 'object'
        schema['properties'] = properties
        schema['additionalProperties'] = allow_additional_properties
    return schema