code: def basename(path):
      
      base_path = path.strip(SEP)
      sep_ind = base_path.rfind(SEP)
      if sep_ind < 0:
          return path
  
      return base_path[sep_ind + 1:]
docs: Rightmost part of path after separator.