code: def allow_upcast(self, to):
          
  
          if self == to:
              return True
          if self == FieldType.TEXT_SINGLE and to == FieldType.TEXT_PRIVATE:
              return True
          return False
docs: Return true if the field type may be upcast to the other field type
          `to`.
  
          This relation specifies when it is safe to transfer data from this
          field type to the given other field type `to`.
  
          This is the case if any of the following holds true:
  
          * `to` is equal to this type
          * this type is :attr:`TEXT_SINGLE` and `to` is :attr:`TEXT_PRIVATE`