code: def _solve_location(self, req, dut_req_len, idx):
          
          if not req.get("location"):
              return
          if len(req.get("location")) == 2:
              for x_and_y, coord in enumerate(req.get("location")):
  
                  if isinstance(coord, string_types):
                      coord = ResourceConfig.__replace_coord_variables(coord,
                                                                       x_and_y,
                                                                       dut_req_len,
                                                                       idx)
                      try:
                          loc = req.get("location")
                          loc[x_and_y] = eval(coord)  # pylint: disable=eval-used
                          req.set("location", loc)
                      except SyntaxError as error:
                          self.logger.error(error)
                          loc = req.get("location")
                          loc[x_and_y] = 0.0
                          req.set("location", loc)
          else:
              self.logger.error("invalid location field!")
              req.set("location", [0.0, 0.0])
docs: Helper function for resolving the location for a resource.
  
          :param req: Requirements dictionary
          :param dut_req_len: Amount of required resources
          :param idx: index, integer
          :return: Nothing, modifies req object