code: def resolve_path(rel_or_abs_path: str, base_dir=BASE_DIR):
      path = rel_or_abs_path.strip()
      if path.startswith("/"):
          return path
      else:
          return os.path.join(base_dir, path)
  
file_path: generative-ai-docs/demos/palm/python/docs-agent/scripts/markdown_to_plain_text.py
imports: from markdown import markdown
  from bs4 import BeautifulSoup
  import os
  import re
  import json
  import frontmatter
  import read_config
  import uuid
label_desc: Use image node_id 1 for calling a global function with example usage: resolve_path(rel_or_abs_path, base_dir) and returns: path, os