code: def set_location(self, obj, cursor):
          
          if (hasattr(cursor, 'location') and cursor.location is not None and
                  cursor.location.file is not None):
              obj.location = (cursor.location.file.name, cursor.location.line)
          return
docs: Location is also used for codegeneration ordering.