def METHOD_NAME(self, resource_requirement: dict, fl_ctx: FLContext):
    if not isinstance(resource_requirement, dict):
        raise TypeError(f"resource_requirement should be of type dict, but got {type(resource_requirement)}.")
    with self._lock:
        is_resource_enough = self._check_required_resource_available(resource_requirement)
        token = ""
        # reserve resource only when enough resource
        if is_resource_enough:
            token = str(uuid.uuid4())
            reserved_resources = self._reserve_resource(resource_requirement)
            self.reserved_resources[token] = (reserved_resources, self.expiration_period)
            self.log_debug(
                fl_ctx, f"reserving resources: {reserved_resources} for requirements {resource_requirement}."
            )
            self.log_debug(
                fl_ctx, f"current resources: {self.resources}, reserved_resources {self.reserved_resources}."
            )
    return is_resource_enough, token