title: How to use MaxLen of typing.Annotation of python 3.9?
body: <p>I'm aware there's this new typing format <code>Annotated</code> where you can specify some metadata to the entry variables of a function. <a href="https://docs.python.org/3/library/typing.html#typing.Annotated" rel="noreferrer">From the docs</a>, you could specify the maximum length of a incoming list such as:</p>
  <blockquote>
  <ul>
  <li>Annotated can be used with nested and generic aliases:</li>
  </ul>
  </blockquote>
  <pre class="lang-py prettyprint-override"><code>T = TypeVar('T')
  Vec = Annotated[list[tuple[T, T]], MaxLen(10)]
  V = Vec[int]
  
  V == Annotated[list[tuple[int, int]], MaxLen(10)]
  </code></pre>
  <p>But I cannot finish to comprehend what <code>MaxLen</code> is. Are you supposed to import a class from somewhere else? I've tried importing <code>typing.MaxLen</code> but doesn't seems to exists (I'm using Python 3.9.6, <a href="https://www.python.org/dev/peps/pep-0593/" rel="noreferrer">which I think it should exist here...?</a>).</p>
  <p>Example code of what I imagined it should have worked:</p>
  <pre class="lang-py prettyprint-override"><code>from typing import List, Annotated, MaxLen
  
  def function(foo: Annotated[List[int], MaxLen(10)]):
      # ...
      return True
  </code></pre>
  <p>Where can one find <code>MaxLen</code>?</p>
  <p><strong>EDIT:</strong></p>
  <p>It seems like <code>MaxLen</code> is some sort of class you have to create. The problem is that I cannot see how you should do it. Are there public examples? How can someone implement this function?</p>