def entity_char_to_token(entity, sentence):
  """
  Takes Stanza entity and sentence objects and returns the start and end tokens for the entity
  :param entity: Stanza entity
  :param sentence: Stanza sentence
  :return (int, int): Returns the start and end locations indexed by tokens
  """
  start_token, end_token = None, None
  for i, v in enumerate(sentence.words):
    x = v.misc.split("|")
    if "start_char=" + str(entity.start_char) in x:
      start_token = i
    if "end_char=" + str(entity.end_char) in x:
      end_token = i + 1
  return start_token, end_token