def source_location_to_tuple(locpb):
  """Converts a SourceLocation proto into a tuple of primitive types."""
  if locpb is None:
    return None
  if not locpb.file() and not locpb.line() and not locpb.function_name():
    return None
  return locpb.file(), locpb.line(), locpb.function_name()