<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_dot_properties(prefix, props, remove_prefix):
 # type: (str, Dict[str, Any], bool) -> Dict[str, Any] """ Gets the properties starting with the given prefix """

    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