def import_from_storage_bucket(self, bucket, file, namespace=None, entity_filter=None, labels=None):
admin_conn = self.get_conn()<EOL>input_url = '<STR_LIT>' + '<STR_LIT:/>'.join(filter(None, [bucket, namespace, file]))<EOL>if not entity_filter:<EOL><INDENT>entity_filter = {}<EOL><DEDENT>if not labels:<EOL><INDENT>labels = {}<EOL><DEDENT>body = {<EOL>'<STR_LIT>': input_url,<EOL>'<STR_LIT>': entity_filter,<EOL>'<STR_LIT>': labels,<EOL>}<EOL>resp = (admin_conn<EOL>.projects()<EOL>.import_(projectId=self.project_id, body=body)<EOL>.execute(num_retries=self.num_retries))<EOL>return resp<EOL>
Import a backup from Cloud Storage to Cloud Datastore.

.. note::
    Keep in mind that this requests the Admin API not the Data API.

.. seealso::
    https://cloud.google.com/datastore/docs/reference/admin/rest/v1/projects/import

:param bucket: The name of the Cloud Storage bucket.
:type bucket: str
:param file: the metadata file written by the projects.export operation.
:type file: str
:param namespace: The Cloud Storage namespace path.
:type namespace: str
:param entity_filter: specify which kinds/namespaces are to be imported.
:type entity_filter: dict
:param labels: Client-assigned labels.
:type labels: dict of str
:return: a resource operation instance.
:rtype: dict