code: def attached_to_model(self):
          
          try:
              if not bool(self.model):
                  return False
          except AttributeError:
              return False
          else:
              try:
                  return not bool(self.instance)
              except AttributeError:
                  return True
docs: Tells if the current index is the one attached to the model field, not instance field