def METHOD_NAME(filename, dirs):
  """Tests whether `filename` is anywhere in any of the given dirs."""
  for dirname in dirs:
    if (filename.startswith(dirname)
        and (len(filename) == len(dirname) or filename[len(dirname)] == '/')):
      return True
  return False