code: def parse_pubmed_url(pubmed_url):
          
          parse_result = urlparse(pubmed_url)
          pattern = re.compile(r'^/pubmed/(\d+)$')
          pmid = pattern.match(parse_result.path).group(1)
          return pmid
docs: Get PubMed ID (pmid) from PubMed URL.