class_docstr: Base Sample class to hold the necessary info and provide atomic operations
class_docstr_tok: ["Base","Sample","class","to","hold","the","necessary","info","and","provide","atomic","operations"]
docstr: Replace items of multi given scopes of field value at the same time.
  Stay away from the complex function !!!
  
  Be careful of your input list shape.
  
  :param str field: field name
  :param list of int|list|slice indices:
      each index can be int indicate replace single item or their list
          like [1, 2, 3],
      can be list like (0,3) indicate replace items from
          0 to 3(not included),
      can be slice which would be convert to list.
  :param items:
  :return: Modified Sample
docstr_tok: ["Replace","items","of","multi","given","scopes","of","field","value","at","the","same","time",".","Stay","away","from","the","complex","function","!","!","!","Be","careful","of","your","input","list","shape",".",":","param","str","field",":","field","name",":","param","list","of","int|list|slice","indices",":","each","index","can","be","int","indicate","replace","single","item","or","their","list","like","[","1",",","2",",","3","]",",","can","be","list","like","(","0,3",")","indicate","replace","items","from","0","to","3","(","not","included",")",",","can","be","slice","which","would","be","convert","to","list",".",":","param","items",":",":","return",":","Modified","Sample"]
code: def replace_field_at_indices(self, field, indices, items):
      r"""
      Replace items of multi given scopes of field value at the same time.
      Stay away from the complex function !!!
  
      Be careful of your input list shape.
  
      :param str field: field name
      :param list of int|list|slice indices:
          each index can be int indicate replace single item or their list
              like [1, 2, 3],
          can be list like (0,3) indicate replace items from
              0 to 3(not included),
          can be slice which would be convert to list.
      :param items:
      :return: Modified Sample
  
      """
      assert (
          isinstance(field, str)
          & isinstance(indices, list)
          & isinstance(items, list)
      ), f"Unequal( field length {0}, indices length {1}, items length {2}"
      assert len(indices) == len(items)
  
      sample = self.clone(self)
      field_obj = getattr(self, field)
      assert isinstance(field_obj, (ListField, TextField))
      rep_field = field_obj.replace_at_indices(indices, items)
      setattr(sample, field, rep_field)
  
      return sample
  
imports: import copy
  from abc import ABC, abstractmethod
  from ..field import ListField, TextField
  from ....common.settings import MODIFIED_MASK
  from ....common.preprocess.en_processor import EnProcessor
label_desc: Use image node_id 12 for calling the Sample obj's underlying member method code with example usage: obj.replace_field_at_indices(field, indices, items) and returns: sample