code: def line(loc: int, strg: str) -> str:
      """
      Returns the line of text containing loc within a string, counting newlines as line separators.
      """
      last_cr = strg.rfind("\n", 0, loc)
      next_cr = strg.find("\n", loc)
      return (
          strg[last_cr + 1 : next_cr]
          if next_cr >= 0
          else strg[last_cr + 1 :]
      )
  
imports: import inspect
  import warnings
  import types
  import collections
  import itertools
  from functools import lru_cache, wraps
  from typing import Callable, List, Union, Iterable, TypeVar, cast
label_desc: Use image node_id 3 for calling a global function with example usage: line(loc, strg) and returns: unknown