code: def allocate(
      self, context: AuthedServiceContext, obj: CreateBlobStorageEntry
  ) -> Union[BlobDepositType, SyftError]:
      with context.node.blob_storage_client.connect() as conn:
          secure_location = conn.allocate(obj)
  
          if isinstance(secure_location, SyftError):
              return secure_location
  
          blob_storage_entry = BlobStorageEntry(
              id=obj.id,
              location=secure_location,
              type_=obj.type_,
              mimetype=obj.mimetype,
              file_size=obj.file_size,
              uploaded_by=context.credentials,
          )
          blob_deposit = conn.write(blob_storage_entry)
  
      result = self.stash.set(context.credentials, blob_storage_entry)
      if result.is_err():
          return SyftError(message=f"{result.err()}")
      return blob_deposit
  
imports: from pathlib import Path
  from typing import List
  from typing import Optional
  from typing import Union
  import requests
  from ...serde.serializable import serializable
  from ...service.action.action_object import ActionObject
  from ...store.blob_storage import BlobRetrieval
  from ...store.blob_storage.on_disk import OnDiskBlobDeposit
  from ...store.blob_storage.seaweedfs import SeaweedFSBlobDeposit
  from ...store.document_store import DocumentStore
  from ...store.document_store import UIDPartitionKey
  from ...types.blob_storage import AzureSecureFilePathLocation
  from ...types.blob_storage import BlobFileType
  from ...types.blob_storage import BlobStorageEntry
  from ...types.blob_storage import BlobStorageMetadata
  from ...types.blob_storage import CreateBlobStorageEntry
  from ...types.blob_storage import SeaweedSecureFilePathLocation
  from ...types.uid import UID
  from ..context import AuthedServiceContext
  from ..response import SyftError
  from ..response import SyftSuccess
  from ..service import AbstractService
  from ..service import TYPE_TO_SERVICE
  from ..service import service_method
  from ..user.user_roles import GUEST_ROLE_LEVEL
  from .remote_profile import AzureRemoteProfile
  from .remote_profile import RemoteProfileStash
  from .stash import BlobStorageStash
label_desc: Use image node_id 8 for calling the BlobStorageService obj's underlying member method code with example usage: obj.allocate(context, obj) and returns: blob_deposit, SyftError, secure_location