Repository: scverse/spatialdata

Issue:
set_table_annotates_spatialelement error
Hi,
I'm following the tutorial of spatialdata (https://spatialdata.scverse.org/en/latest/tutorials/notebooks/notebooks/examples/tables.html) 
```
polygon_index = list(sdata.shapes["blobs_polygons"].index)
# We have to do a compute here as points are lazily loaded using dask.
point_index = list(sdata["blobs_points"].index.compute())

region_column = ["blobs_polygons"] * len(polygon_index) + ["blobs_points"] * len(point_index)
instance_id_column = polygon_index + point_index

import numpy as np

RNG = np.random.default_rng()
table = AnnData(
    X=np.zeros((len(region_column), 1)),
    obs={"region": region_column, "instance_id": instance_id_column},
)
table = table[RNG.permutation(table.obs.index), :].copy()

# Now we have to specify all 3 annotation metadata fields.
sdata_table = TableModel.parse(
    table, region=["blobs_polygons", "blobs_points"], region_key="region", instance_key="instance_id"
)

# When adding the table now, it is validated for presence of annotation targets in the sdata object.
sdata["annotations"] = sdata_table
```
Everything went well so far, but when I input `sdata.set_table_annotates_spatialelement("annotations", region=pd.Series(["blobs_polygons", "blobs_points"]), region_key="region", instance_key="instance_id")`, the following error occurred:

![image](https://github.com/scverse/spatialdata/assets/29703450/857df2ef-3d65-436f-a71b-95a01413d21d)

I can run `sdata.set_table_annotates_spatialelement("table", region="labels_as_circles")` successfully, so I suppose to run `sdata.set_table_annotates_spatialelement("annotations", region=pd.Series(["blobs_polygons", "blobs_points"]), region_key="region", instance_key="instance_id")` successfully, but it failed. Could you help ?

Discussion:
codecov[bot]: ## [Codecov](https://app.codecov.io/gh/scverse/spatialdata/pull/605?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scverse) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 91.92%. Comparing base [(`0727b08`)](https://app.codecov.io/gh/scverse/spatialdata/commit/0727b0810c5ac09c5b9ee2241b32302e00f5c1ac?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scverse) to head [(`b1c7f7b`)](https://app.codecov.io/gh/scverse/spatialdata/commit/b1c7f7bbaffa5a4ab23c394642164cd68b105be8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scverse).

> :exclamation: **Current head b1c7f7b differs from pull request most recent head fc1fca8**
> 
> Please [upload](https://docs.codecov.com/docs/codecov-uploader) reports for the commit fc1fca8 to get more accurate results.

<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##             main     #605      +/-   ##
==========================================
+ Coverage   91.91%   91.92%   +0.01%     
==========================================
  Files          44       44              
  Lines        6641     6638       -3     
==========================================
- Hits         6104     6102       -2     
+ Misses        537      536       -1     
```

| [Files](https://app.codecov.io/gh/scverse/spatialdata/pull/605?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scverse) | Coverage Δ | |
|---|---|---|
| [src/spatialdata/\_core/spatialdata.py](https://app.codecov.io/gh/scverse/spatialdata/pull/605?src=pr&el=tree&filepath=src%2Fspatialdata%2F_core%2Fspatialdata.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scverse#diff-c3JjL3NwYXRpYWxkYXRhL19jb3JlL3NwYXRpYWxkYXRhLnB5) | `91.00% <100.00%> (+0.10%)` | :arrow_up: |
| [src/spatialdata/models/models.py](https://app.codecov.io/gh/scverse/spatialdata/pull/605?src=pr&el=tree&filepath=src%2Fspatialdata%2Fmodels%2Fmodels.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scverse#diff-c3JjL3NwYXRpYWxkYXRhL21vZGVscy9tb2RlbHMucHk=) | `87.69% <100.00%> (ø)` | |

... and [3 files with indirect coverage changes](https://app.codecov.io/gh/scverse/spatialdata/pull/605/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scverse)

</details>

Patch:
diff --git a/docs/tutorials/notebooks b/docs/tutorials/notebooks
index ee68f0d..00a9c79 160000
--- a/docs/tutorials/notebooks
+++ b/docs/tutorials/notebooks
@@ -1,1 +1,1 @@
-Subproject commit ee68f0db7300b23eca341d65415ed66a0dd9ee03
+Subproject commit 00a9c79a87d012b8666c762946c553c659d80ac1
diff --git a/src/spatialdata/_core/spatialdata.py b/src/spatialdata/_core/spatialdata.py
index 0f7facd..a8112f2 100644
--- a/src/spatialdata/_core/spatialdata.py
+++ b/src/spatialdata/_core/spatialdata.py
@@ -389,7 +389,7 @@ class SpatialData:
             If provided region_key is not present in table.obs.
         """
         attrs = table.uns[TableModel.ATTRS_KEY]
-        table_region_key = region_key if region_key else attrs.get(TableModel.REGION_KEY_KEY)
+        table_region_key = region_key if region_key is not None else attrs.get(TableModel.REGION_KEY_KEY)
 
         TableModel()._validate_set_region_key(table, region_key)
         TableModel()._validate_set_instance_key(table, instance_key)
@@ -430,7 +430,7 @@ class SpatialData:
     def set_table_annotates_spatialelement(
         self,
         table_name: str,
-        region: str | pd.Series,
+        region: str | pd.Series | list[str],
         region_key: None | str = None,
         instance_key: None | str = None,
     ) -> None:
@@ -459,7 +459,10 @@ class SpatialData:
         """
         table = self.tables[table_name]
         element_names = {element[1] for element in self._gen_elements()}
-        if region not in element_names:
+        if (isinstance(region, str) and region not in element_names) or (
+            isinstance(element_names, (list, pd.Series))
+            and not all(region_element in element_names for region_element in region)
+        ):
             raise ValueError(f"Annotation target '{region}' not present as SpatialElement in SpatialData object.")
 
         if table.uns.get(TableModel.ATTRS_KEY):
diff --git a/src/spatialdata/models/models.py b/src/spatialdata/models/models.py
index 943b669..dc4107f 100644
--- a/src/spatialdata/models/models.py
+++ b/src/spatialdata/models/models.py
@@ -748,7 +748,7 @@ class TableModel:
         if attrs is None:
             data.uns[self.ATTRS_KEY] = attrs = {}
         table_region_key = attrs.get(self.REGION_KEY_KEY)
-        if not region_key:
+        if region_key is None:
             if not table_region_key:
                 raise ValueError(
                     "No region_key in table.uns and no region_key provided as argument. Please specify 'region_key'."


Test patch:
diff --git a/tests/io/test_multi_table.py b/tests/io/test_multi_table.py
index b8f2023..8f6d818 100644
--- a/tests/io/test_multi_table.py
+++ b/tests/io/test_multi_table.py
@@ -1,5 +1,6 @@
 from pathlib import Path
 
+import pandas as pd
 import pytest
 from anndata import AnnData
 from anndata.tests.helpers import assert_equal
@@ -112,6 +113,13 @@ class TestMultiTable:
             "table", "labels2d", region_key="region", instance_key="instance_id"
         )
 
+        region = ["circles"] * 50 + ["poly"] * 50
+        full_sdata["table"].obs["region"] = region
+
+        full_sdata.set_table_annotates_spatialelement(
+            "table", pd.Series(["circles", "poly"]), region_key="region", instance_key="instance_id"
+        )
+
     def test_old_accessor_deprecation(self, full_sdata, tmp_path):
         # To test self._backed
         tmpdir = Path(tmp_path) / "tmp.zarr"