docs: def get_ast_obj(belstr, bel_version, component_type: str = ""):
      """Convert AST partialparse dict to BELAst"""
  
      ast_dict, errors = get_ast_dict(belstr, component_type)
  
      spec = bel_specification.get_specification(bel_version)
  
      subj = ast_dict["subject"]
      subj_ast = add_ast_fn(subj, spec)
  
      relation = None
      obj = None
  
      if "relation" in ast_dict:
          relation = ast_dict["relation"]["name"]
  
      if "object" in ast_dict:
          obj = ast_dict["object"]
          obj_ast = add_ast_fn(obj, spec)
  
          return BELAst(subj_ast, relation, obj_ast, spec)
      elif "nested" in ast_dict:
          nested_subj = ast_dict["nested"]["subject"]
          nested_subj_ast = add_ast_fn(nested_subj, spec)
          nested_relation = ast_dict["nested"]["relation"]["name"]
          nested_obj = ast_dict["nested"]["object"]
          nested_obj_ast = add_ast_fn(nested_obj, spec)
  
          return BELAst(
              subj_ast,
              relation,
              BELAst(nested_subj_ast, nested_relation, nested_obj_ast, spec),
              spec,
          )
  
      return BELAst(subj_ast, None, None, spec)