class_docstr: The encoding of the head and tail entities in a sentence with a relation annotation.
class_docstr_tok: ["The","encoding","of","the","head","and","tail","entities","in","a","sentence","with","a","relation","annotation","."]
docstr: Returns the encoded string representation of the head span.
  
  Multi-token head encodings tokens are separated by a space.
docstr_tok: ["Returns","the","encoded","string","representation","of","the","head","span",".","Multi-token","head","encodings","tokens","are","separated","by","a","space","."]
code: def encode_head(self, head_span: Span, label: Label) -> str:
      """Returns the encoded string representation of the head span.
  
      Multi-token head encodings tokens are separated by a space.
      """
      ...
  
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 2 for calling the EncodingStrategy obj's underlying member method code with example usage: obj.encode_head(head_span, label) without return types