code: def get_dot_properties(prefix, props, remove_prefix):
      # type: (str, Dict[str, Any], bool) -> Dict[str, Any]
      
      result_props = {}
      if props:
          dot_keys = [x for x in props.keys() if x.startswith(prefix + ".")]
          for dot_key in dot_keys:
              if remove_prefix:
                  new_key = dot_key[len(prefix) + 1 :]
              else:
                  new_key = dot_key
              result_props[new_key] = props.get(dot_key)
      return result_props
docs: Gets the properties starting with the given prefix