def expand_resource_descriptor(descriptor):
descriptor.setdefault('<STR_LIT>', config.DEFAULT_RESOURCE_PROFILE)<EOL>if descriptor['<STR_LIT>'] == '<STR_LIT>':<EOL><INDENT>schema = descriptor.get('<STR_LIT>')<EOL>if schema is not None:<EOL><INDENT>for field in schema.get('<STR_LIT>', []):<EOL><INDENT>field.setdefault('<STR_LIT:type>', config.DEFAULT_FIELD_TYPE)<EOL>field.setdefault('<STR_LIT>', config.DEFAULT_FIELD_FORMAT)<EOL><DEDENT>schema.setdefault('<STR_LIT>', config.DEFAULT_MISSING_VALUES)<EOL><DEDENT>dialect = descriptor.get('<STR_LIT>')<EOL>if dialect is not None:<EOL><INDENT>for key, value in config.DEFAULT_DIALECT.items():<EOL><INDENT>dialect.setdefault(key, value)<EOL><DEDENT><DEDENT><DEDENT>return descriptor<EOL>
Apply defaults to resource descriptor (IN-PLACE FOR NOW).