original_docstring: 
          Process each of the references, simply storing them as Reference objects
          
docstring: Process each of the references, simply storing them as Reference objects
docstring_tokens: Process each of the references simply storing them as Reference objects
code: def execute(self, state: "State"):
          """
          Process each of the references, simply storing them as Reference objects
          """
          glb_idx, p_sets, hh, datasets, mappings = get_case_study_registry_objects(state)
          name = self._content["command_name"]
          issues = []
  
          # Receive a list of validated references
          # Store them as objects, which can be referred to later
          for ref in self._content["items"]:
              r = ref["_row"]
  
              if "ref_id" not in ref:
                  issues.append(Issue(itype=IType.ERROR,
                                      description="'ref_id' field not found: "+str(ref),
                                      location=IssueLocation(sheet_name=name, row=r, column=None)))
                  continue
              else:
                  ref_id = ref["ref_id"]
                  existing = glb_idx.get(self.ref_type.partial_key(ref_id))
                  if len(existing) == 1:
                      issues.append(Issue(itype=IType.ERROR,
                                          description="Reference '"+ref_id+"' of type '"+str(self.ref_type)+"' is already defined. Not allowed",
                                          location=IssueLocation(sheet_name=name, row=r, column=None)))
                      continue
                  elif len(existing) > 1:  # This condition should not occur...
                      issues.append(Issue(itype=IType.ERROR,
                                          description="The reference '"+ref_id+"' of type '"+str(self.ref_type)+"' is defined more than one time ("+str(len(existing))+")",
                                          location=IssueLocation(sheet_name=name, row=r, column=None)))
                      continue
  
                  # Create and store the Reference
                  reference = self.ref_type(ref_id, ref)
                  glb_idx.put(reference.key(), reference)
  
                  # BibliographicReference and ProvenanceReference ar also Observer
                  if isinstance(reference, Observer):
                      glb_idx.put(Observer.key(reference), reference)
  
          return issues, None
code_tokens: def execute ( self , state : "State" ) : glb_idx , p_sets , hh , datasets , mappings = get_case_study_registry_objects ( state ) name = self . _content [ "command_name" ] issues = [ ] for ref in self . _content [ "items" ] : r = ref [ "_row" ] if "ref_id" not in ref : issues . append ( Issue ( itype = IType . ERROR , description = "'ref_id' field not found: " + str ( ref ) , location = IssueLocation ( sheet_name = name , row = r , column = None ) ) ) continue else : ref_id = ref [ "ref_id" ] existing = glb_idx . get ( self . ref_type . partial_key ( ref_id ) ) if len ( existing ) == 1 : issues . append ( Issue ( itype = IType . ERROR , description = "Reference '" + ref_id + "' of type '" + str ( self . ref_type ) + "' is already defined. Not allowed" , location = IssueLocation ( sheet_name = name , row = r , column = None ) ) ) continue elif len ( existing ) > 1 : issues . append ( Issue ( itype = IType . ERROR , description = "The reference '" + ref_id + "' of type '" + str ( self . ref_type ) + "' is defined more than one time (" + str ( len ( existing ) ) + ")" , location = IssueLocation ( sheet_name = name , row = r , column = None ) ) ) continue reference = self . ref_type ( ref_id , ref ) glb_idx . put ( reference . key ( ) , reference ) if isinstance ( reference , Observer ) : glb_idx . put ( Observer . key ( reference ) , reference ) return issues , None
short_docstring: Process each of the references, simply storing them as Reference objects
short_docstring_tokens: Process each of the references simply storing them as Reference objects
comment: """
          Process each of the references, simply storing them as Reference objects
          """$SEP$# Receive a list of validated references$SEP$# Store them as objects, which can be referred to later$SEP$# This condition should not occur...$SEP$# Create and store the Reference$SEP$# BibliographicReference and ProvenanceReference ar also Observer