code: def from_lark(
      grammar,  # type: lark.lark.Lark
      start=None,  # type: Text
      explicit=None,  # type: Dict[Text, st.SearchStrategy[Text]]
  ):
      # type: (...) -> st.SearchStrategy[Text]
      """A strategy for strings accepted by the given context-free grammar.
  
      ``grammar`` must be a ``Lark`` object, which wraps an EBNF specification.
      The Lark EBNF grammar reference can be found
      `here <https://lark-parser.readthedocs.io/en/latest/grammar/>`_.
  
      ``from_lark`` will automatically generate strings matching the
      nonterminal ``start`` symbol in the grammar, which was supplied as an
      argument to the Lark class.  To generate strings matching a different
      symbol, including terminals, you can override this by passing the
      ``start`` argument to ``from_lark``.  Note that Lark may remove unreachable
      productions when the grammar is compiled, so you should probably pass the
      same value for ``start`` to both.
  
      Currently ``from_lark`` does not support grammars that need custom lexing.
      Any lexers will be ignored, and any undefined terminals from the use of
      ``%declare`` will result in generation errors.  To define strategies for
      such terminals, pass a dictionary mapping their name to a corresponding
      strategy as the ``explicit`` argument.
  
      The :pypi:`hypothesmith` project includes a strategy for Python source,
      based on a grammar and careful post-processing.
      """
      check_type(lark.lark.Lark, grammar, "grammar")
      if explicit is None:
          explicit = {}
      else:
          check_type(dict, explicit, "explicit")
          explicit = {
              k: v.map(check_explicit("explicit[%r]=%r" % (k, v)))
              for k, v in explicit.items()
          }
      return LarkStrategy(grammar, start, explicit)
  
imports: from __future__ import absolute_import, division, print_function
  import attr
  import lark
  from lark.grammar import NonTerminal, Terminal
  import hypothesis.strategies._internal.core
  from hypothesis.errors import InvalidArgument
  from hypothesis.internal.compat import getfullargspec, string_types
  from hypothesis.internal.conjecture.utils import calc_label_from_name
  from hypothesis.internal.validation import check_type
  from hypothesis.strategies._internal import SearchStrategy
label_desc: Use image node_id 3 for calling a global function with example usage: from_lark(grammar, start, explicit) and returns: LarkStrategy