<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _create_body(self, name, flavor=None, volume=None, databases=None, users=None, version=None, type=None):
 """ Used to create the dict required to create a Cloud Database instance. """

        if flavor is None:
            flavor = 1
        flavor_ref = self.api._get_flavor_ref(flavor)
        if volume is None:
            volume = 1
        if databases is None:
            databases = []
        if users is None:
            users = []

        body = {"instance": {
                "name": name,
                "flavorRef": flavor_ref,
                "volume": {"size": volume},
                "databases": databases,
                "users": users,
                }}

        if type is not None or version is not None:
            required = (type, version)
            if all(required):
                body['instance']['datastore'] = {"type": type, "version": version}
            else:
                raise exc.MissingCloudDatabaseParameter("Specifying a datastore"
                    " requires both the datastore type as well as the version.")
        return body