code: def get_recid_from_ref(ref_obj):
      
      if not isinstance(ref_obj, dict):
          return None
      url = ref_obj.get('$ref', '')
      return maybe_int(url.split('/')[-1])
docs: Retrieve recid from jsonref reference object.
  
      If no recid can be parsed, returns None.