class_docstr: An `class`:EncodingStrategy: that marks the head and tail relation entities with their label.
  
  Example:
  -------
      For the `founded_by` relation from `ORG` to `PER` and
      the sentence "Larry Page and Sergey Brin founded Google .",
      the encoded sentences and relations are
      - "[HEAD-PER] Larry Page [/HEAD-PER] and Sergey Brin founded [TAIL-ORG] Google [/TAIL-ORG]"
          -> Relation(head='Google', tail='Larry Page')  and
      - "Larry Page and [HEAD-PER] Sergey Brin [/HEAD-PER] founded [TAIL-ORG] Google [/TAIL-ORG]"
          -> Relation(head='Google', tail='Sergey Brin').
class_docstr_tok: ["An","`","class","`",":","EncodingStrategy",":","that","marks","the","head","and","tail","relation","entities","with","their","label",".","Example",":","--","--","--","-","For","the","`","founded_by","`","relation","from","`","ORG","`","to","`","PER","`","and","the","sentence","``","Larry","Page","and","Sergey","Brin","founded","Google",".","``",",","the","encoded","sentences","and","relations","are","-","``","[","HEAD-PER","]","Larry","Page","[","\/HEAD-PER","]","and","Sergey","Brin","founded","[","TAIL-ORG","]","Google","[","\/TAIL-ORG","]","''","-",">","Relation","(","head='Google","'",",","tail='Larry","Page","'",")","and","-","``","Larry","Page","and","[","HEAD-PER","]","Sergey","Brin","[","\/HEAD-PER","]","founded","[","TAIL-ORG","]","Google","[","\/TAIL-ORG","]","''","-",">","Relation","(","head='Google","'",",","tail='Sergey","Brin","'",")","."]
code: def encode_head(self, head: Span, label: Label) -> str:
      space_tokenized_text: str = " ".join(token.text for token in head)
      return f"[HEAD-{label.value}] {space_tokenized_text} [/HEAD-{label.value}]"
  
imports: import itertools
  import logging
  import typing
  from abc import ABC, abstractmethod
  from pathlib import Path
  from typing import Any, Dict, Iterator, List, NamedTuple, Optional, Sequence, Set, Tuple, Union, cast
  import torch
  from torch.utils.data.dataset import Dataset
  import flair
  from flair.data import Corpus, Dictionary, Label, Relation, Sentence, Span, Token, _iter_dataset
  from flair.datasets import DataLoader, FlairDatapointDataset
  from flair.embeddings import DocumentEmbeddings, TransformerDocumentEmbeddings
  from flair.tokenization import SpaceTokenizer
label_desc: Use image node_id 1 for calling the TypedEntityMarker obj's underlying member method code with example usage: obj.encode_head(head, label) and returns: str, label, str, space_tokenized_text, str, label, str