docstr: Generate a dictionary representation of the current object:
      {
          "block_type": <"interval", "rectangle", "quadrilateral"> ,
          "non_empty_block_attr1": value1,
          ...
      }
docstr_tok: ["Generate","a","dictionary","representation","of","the","current","object",":","{","``","block_type","''",":","<","``","interval","''",",","``","rectangle","''",",","``","quadrilateral","''",">",",","``","non_empty_block_attr1","''",":","value1",",","...","}"]
code: def to_dict(self) -> Dict[str, Any]:
      """
      Generate a dictionary representation of the current object:
          {
              "block_type": <"interval", "rectangle", "quadrilateral"> ,
              "non_empty_block_attr1": value1,
              ...
          }
      """
  
      data = {
          key: getattr(self, key)
          for key in self._features
          if getattr(self, key) is not None
      }
      data["block_type"] = self._name
      return data
  
imports: from typing import List, Dict, Dict, Any
  from abc import ABC, abstractmethod
  from copy import copy
label_desc: Use image node_id 17 for calling the BaseCoordElement obj's underlying member method code with example usage: obj.to_dict() and returns: data