class_docstr: An ExternalIdIndex maps between "external IDs" and "integer locations" or "internal locations"
  (ilocs).
  
  It is designed to allow handling only efficient integers internally, but easily convert between
  them and the user-facing IDs.
class_docstr_tok: ["An","ExternalIdIndex","maps","between","``","external","IDs","''","and","``","integer","locations","''","or","``","internal","locations","''","(","ilocs",")",".","It","is","designed","to","allow","handling","only","efficient","integers","internally",",","but","easily","convert","between","them","and","the","user-facing","IDs","."]
docstr: Flags the locations of all the ilocs that are valid (that is, where to_iloc didn't fail).
code: def is_valid(self, ilocs: np.ndarray) -> np.ndarray:
      """
      Flags the locations of all the ilocs that are valid (that is, where to_iloc didn't fail).
      """
      return (0 <= ilocs) & (ilocs < len(self))
  
imports: import itertools
  from collections import defaultdict
  import numpy
  import pandas
  import scipy.sparse
  from ..globalvar import SOURCE, TARGET, WEIGHT, TYPE_ATTR_NAME
  from .validation import require_dataframe_has_columns, comma_sep
label_desc: Use image node_id 5 for calling the ExternalIdIndex obj's underlying member method code with example usage: obj.is_valid(ilocs) and returns: unknown