def METHOD_NAME(self) -> Optional["Dataset"]:
    """The scopes of a dataset is the set of other datasets on which analysis or
    enrichment should be performed by the runner."""
    inputs: List[Dataset] = []
    for input_name in self._inputs:
        try:
            inputs.append(self.catalog.require(input_name))
        except MetadataException as exc:
            log.error(
                "Invalid dataset input: %s" % exc,
                METHOD_NAME=input_name,
                dataset=self.name,
            )
    if not len(inputs):
        return None
    if len(inputs) == 1:
        return inputs[0]
    # Weird: if there are many scopes, we're making up a synthetic collection
    # to group them together so that we can build a store and view for them.
    names = sorted([i.name for i in inputs])
    key = hash_data(".".join(names))
    name = f"scope_{key}"
    if not self.catalog.has(name):
        data = {
            "name": name,
            "title": name,
            "datasets": names,
            "hidden": True,
        }
        scope = self.catalog.make_dataset(data)
        self.catalog.add(scope)
    return self.catalog.require(name)