def tensor_subfield_map(self) -> Dict[str, TensorField]:
        """
        A map from tensor chunk and embeddings field name to the TensorField object.
        """

        def generate():
            the_map = dict()
            for tensor_field in self.tensor_fields:
                if tensor_field.chunk_field_name in the_map:
                    raise ValueError(
                        f"Duplicate chunk field name {tensor_field.chunk_field_name} "
                        f"for tensor field {tensor_field.name}"
                    )
                the_map[tensor_field.chunk_field_name] = tensor_field

                if tensor_field.embeddings_field_name in the_map:
                    raise ValueError(
                        f"Duplicate embeddings field name {tensor_field.embeddings_field_name} "
                        f"for tensor field {tensor_field.name}"
                    )
                the_map[tensor_field.embeddings_field_name] = tensor_field

            return the_map

        return self._cache_or_get('tensor_subfield_map', generate)

        A map from tensor chunk and embeddings field name to the TensorField object.
        
src/marqo/core/models/marqo_index.py